aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack
diff options
context:
space:
mode:
Diffstat (limited to 'ctrack')
-rw-r--r--ctrack/assessments/tests/conftest.py7
-rw-r--r--ctrack/assessments/tests/test_assessments.py8
2 files changed, 11 insertions, 4 deletions
diff --git a/ctrack/assessments/tests/conftest.py b/ctrack/assessments/tests/conftest.py
index 4a9126c..1435c86 100644
--- a/ctrack/assessments/tests/conftest.py
+++ b/ctrack/assessments/tests/conftest.py
@@ -1,4 +1,11 @@
# TODO Here we need to make use of the populate script to create a massive
# test fixture.
+import pytest
+from ctrack.core.utils import populate_db
+
+
+@pytest.fixture
+def full_db_fixture():
+ populate_db(orgs=2, igps=2)
diff --git a/ctrack/assessments/tests/test_assessments.py b/ctrack/assessments/tests/test_assessments.py
index 4443a18..2aaed12 100644
--- a/ctrack/assessments/tests/test_assessments.py
+++ b/ctrack/assessments/tests/test_assessments.py
@@ -7,11 +7,11 @@ from ctrack.assessments.models import IGP
pytestmark = pytest.mark.django_db
-
-@pytest.mark.skip("Use once we populate the test database")
-def test_get_random_igps():
+def test_get_random_igps(full_db_fixture):
na = AchievementLevel.objects.filter(descriptor="Not Achieved").first()
co1 = CAFContributingOutcome.objects.get(pk=1)
igps_co1 = IGP.objects.filter(contributing_outcome=co1,
achievement_level=na)
- assert False
+ assert co1.designation == "A1.a"
+ assert na.descriptor == "Not Achieved"
+ assert igps_co1.first().descriptive_text[:5] == "IGP 1"