From 3061638f2de30d9dc587480cc47672eb25d15171 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Fri, 21 Feb 2020 14:30:49 +0000 Subject: fixed test imports --- ctrack/organisations/models.py | 5 +---- ctrack/organisations/tests/factories.py | 2 +- ctrack/organisations/tests/test_factories.py | 24 ++++-------------------- 3 files changed, 6 insertions(+), 25 deletions(-) (limited to 'ctrack/organisations') diff --git a/ctrack/organisations/models.py b/ctrack/organisations/models.py index 13023a0..8fac747 100644 --- a/ctrack/organisations/models.py +++ b/ctrack/organisations/models.py @@ -1,9 +1,6 @@ -from django.db import models - from django.contrib.auth import get_user_model - +from django.db import models from django.urls import reverse -from django.conf import settings from django_extensions.db.fields import AutoSlugField from slugify import slugify diff --git a/ctrack/organisations/tests/factories.py b/ctrack/organisations/tests/factories.py index 1a7b36d..b082290 100644 --- a/ctrack/organisations/tests/factories.py +++ b/ctrack/organisations/tests/factories.py @@ -5,7 +5,7 @@ import factory from django.contrib.auth import get_user_model from factory import DjangoModelFactory, Faker, SubFactory, post_generation -from ctrack.organisations.models import Mode, Organisation, Person, Role, Submode, Address, AddressType +from ctrack.organisations.models import Organisation, Person, Role, Address User = get_user_model() diff --git a/ctrack/organisations/tests/test_factories.py b/ctrack/organisations/tests/test_factories.py index 68af6f5..9c0d575 100644 --- a/ctrack/organisations/tests/test_factories.py +++ b/ctrack/organisations/tests/test_factories.py @@ -1,23 +1,7 @@ -import pytest - -from .factories import ( - PersonFactory, - ModeFactory, - SubModeFactory, - UserFactory, - OrganisationFactory, - RoleFactory) - - -def test_mode_factory(): - m = ModeFactory.build() - assert m.descriptor - - -def test_submode_factory(): - sm = SubModeFactory.build() - assert sm.descriptor - assert sm.mode +from ctrack.organisations.tests.factories import OrganisationFactory +from ctrack.organisations.tests.factories import PersonFactory +from ctrack.organisations.tests.factories import RoleFactory +from ctrack.organisations.tests.factories import UserFactory def test_user_factory(): -- cgit v1.2.3