Skip to content

Commit

Permalink
CONCD-824 updating unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rasarkar committed Jul 31, 2024
1 parent c5d3880 commit 29d2703
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions concordia/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,14 @@ def test_review_incidents(self):
)
users = ConcordiaUser.objects.review_incidents()
self.assertEqual(len(users), 1)
self.assertEqual(users[0][0], 3)
self.assertEqual(
users[0],
(
self.transcription1.reviewed_by.id,
self.transcription1.reviewed_by.username,
1,
),
)

create_transcription(
asset=self.transcription1.asset,
Expand All @@ -93,7 +100,14 @@ def test_review_incidents(self):
)
users = ConcordiaUser.objects.review_incidents()
self.assertEqual(len(users), 1)
self.assertEqual(users[0][0], 3)
self.assertEqual(
users[0],
(
self.transcription1.reviewed_by.id,
self.transcription1.reviewed_by.username,
2,
),
)

def test_transcribe_incidents(self):
self.transcription1.submitted = timezone.now()
Expand Down Expand Up @@ -124,7 +138,10 @@ def test_transcribe_incidents(self):
)
users = ConcordiaUser.objects.transcribe_incidents()
self.assertEqual(len(users), 1)
self.assertEqual(users[0][0], 1)
self.assertEqual(
users[0],
(self.transcription1.user.id, self.transcription1.user.username, 1),
)

create_transcription(
asset=self.transcription1.asset,
Expand All @@ -133,7 +150,10 @@ def test_transcribe_incidents(self):
)
users = ConcordiaUser.objects.transcribe_incidents()
self.assertEqual(len(users), 1)
self.assertEqual(users[0][0], 1)
self.assertEqual(
users[0],
(self.transcription1.user.id, self.transcription1.user.username, 2),
)


class AssetTestCase(CreateTestUsers, TestCase):
Expand Down

0 comments on commit 29d2703

Please sign in to comment.