aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/organisations/tests/test_factories.py
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2020-02-19 21:22:21 +0000
committerMatthew Lemon <matt@matthewlemon.com>2020-02-19 21:22:21 +0000
commitac2a715c0bc38e8a03640c604b8ed082456b2109 (patch)
treedec73bfcbf7920e18e94c493484e7368641d3387 /ctrack/organisations/tests/test_factories.py
parentafed43baeb9b4f9ee9f449b7be4e8a89a65ce9a8 (diff)
new migrations and working through factory issue
Diffstat (limited to '')
-rw-r--r--ctrack/organisations/tests/test_factories.py41
1 files changed, 41 insertions, 0 deletions
diff --git a/ctrack/organisations/tests/test_factories.py b/ctrack/organisations/tests/test_factories.py
new file mode 100644
index 0000000..38082fc
--- /dev/null
+++ b/ctrack/organisations/tests/test_factories.py
@@ -0,0 +1,41 @@
+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
+
+
+def test_user_factory():
+ u = UserFactory.build()
+ assert u.name
+
+
+def test_organisation_factory():
+ o = OrganisationFactory.build()
+ assert o.name
+
+
+def test_role_factory():
+ r = RoleFactory.build()
+ assert r.name
+
+
+def test_person_factory():
+ r = RoleFactory.build()
+ p = PersonFactory.build(role=r)
+ assert p.first_name