Closed
Description
I'm using factory_boy with https://github.com/pytest-dev/pytest-django.
python: 3.6.2
django: 1.11.4
pytest-django: 3.1.2
factory-boy: 2.8.1 (downgraded due to #47 (comment))
pytest-factoryboy: 1.3.1
Here's my app1/conftest.py:
# -*- coding: utf-8 -*-
import factory
import pytest
from django.contrib.auth import get_user_model
from django.core.management import call_command
from pytest_factoryboy import register
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = get_user_model()
username = factory.Sequence(lambda n: "user%03d" % n)
password = factory.Sequence(lambda n: "pass%03d" % n)
register(UserFactory)
This makes user
available as a fixture for me. However, it only works in tests in the same application, not project-wide (in different django application test directories).
Am I doing it wrong, then? I'm trying to narrow down if this is a mistake on my end, a bug, a potential feature, or expected behavior.
Metadata
Metadata
Assignees
Labels
No labels