From 54c553312f71e889e007ed35dff27a23e024c3c4 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sat, 9 May 2020 22:13:44 -0700 Subject: [PATCH] Separate import job tests out --- fedireads/tests/test_import_model.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fedireads/tests/test_import_model.py b/fedireads/tests/test_import_model.py index bcdcafb9..6fcca0cd 100644 --- a/fedireads/tests/test_import_model.py +++ b/fedireads/tests/test_import_model.py @@ -89,23 +89,21 @@ class ImportJob(TestCase): self.assertEqual(item.date_read, expected) - def test_reads(self): - ''' various states of reading ''' - # currently reading + def test_currently_reading_reads(self): expected = [models.ReadThrough( start_date=datetime.datetime(2019, 4, 9, 0, 0))] actual = models.ImportItem.objects.get(index=1) self.assertEqual(actual.reads[0].start_date, expected[0].start_date) self.assertEqual(actual.reads[0].finish_date, expected[0].finish_date) - # read + def test_read_reads(self): expected = [models.ReadThrough( finish_date=datetime.datetime(2019, 4, 9, 0, 0))] actual = models.ImportItem.objects.get(index=2) self.assertEqual(actual.reads[0].start_date, expected[0].start_date) self.assertEqual(actual.reads[0].finish_date, expected[0].finish_date) - # unknown dates + def test_unread_reads(self): expected = [] actual = models.ImportItem.objects.get(index=3) self.assertEqual(actual.reads, expected)