aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/organisations
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-02-21 14:30:49 +0000
committerMatthew Lemon <lemon@matthewlemon.com>2020-02-21 14:30:49 +0000
commit3061638f2de30d9dc587480cc47672eb25d15171 (patch)
treec412ad6a870d2ded21cc608a292dbc1d0a6b9b10 /ctrack/organisations
parent2b9769bca5959b4f25f0fdd3d35797f9b7b887af (diff)
fixed test imports
Diffstat (limited to '')
-rw-r--r--ctrack/organisations/models.py5
-rw-r--r--ctrack/organisations/tests/factories.py2
-rw-r--r--ctrack/organisations/tests/test_factories.py24
3 files changed, 6 insertions, 25 deletions
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():