diff --git a/backend/examples/tests/test_models.py b/backend/examples/tests/test_models.py index 96844ed0..c7b70808 100644 --- a/backend/examples/tests/test_models.py +++ b/backend/examples/tests/test_models.py @@ -55,7 +55,8 @@ class TestExampleState(TestCase): expected_progress = [{"user": member.username, "done": 0} for member in self.project.members] expected_progress[0]["done"] = 1 expected_progress[1]["done"] = 1 - self.assertEqual(progress, {"total": 2, "progress": expected_progress}) + self.assertEqual(progress["total"], 2) + self.assertCountEqual(progress["progress"], expected_progress) class TestExample(TestCase): diff --git a/backend/label_types/tests/utils.py b/backend/label_types/tests/utils.py index 8562aadf..a6a5ca5c 100644 --- a/backend/label_types/tests/utils.py +++ b/backend/label_types/tests/utils.py @@ -1,10 +1,10 @@ from model_mommy import mommy -from projects.models import BOUNDING_BOX +from projects.models import BOUNDING_BOX, SEGMENTATION def make_label(project, **kwargs): - if project.project_type.endswith("Classification") or project.project_type == BOUNDING_BOX: + if project.project_type.endswith("Classification") or project.project_type in {BOUNDING_BOX, SEGMENTATION}: return mommy.make("CategoryType", project=project, **kwargs) else: return mommy.make("SpanType", project=project, **kwargs)