Skip to content

Commit

Permalink
Fix data issues
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmas-mnt committed Jan 30, 2024
1 parent 80ee77e commit dbc74b9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
15 changes: 11 additions & 4 deletions book/test/data/fasts/test_fasts.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_lent_period_inside(self):
def test_lent_period_end(self):
fast = self.repo.fasts.by_id('fast:lent')

actual = fast.matches_date(datetime(2024, 5, 5))
actual = fast.matches_date(datetime(2024, 5, 4))

self.assertTrue(actual)

Expand Down Expand Up @@ -163,6 +163,13 @@ def test_lent_sun_w2(self):
self.assertEqual('oil', actual.fast_type.id)
self.assertIsNotNone(actual.fast_type.title)

def test_easter_sun(self):
actual = self.repo.fasts.for_date(datetime(2024, 5, 5))

self.assertEqual('fast:easter', actual.fast.id)
self.assertEqual('no-fast', actual.fast_type.id)
self.assertIsNotNone(actual.fast_type.title)

def test_apostles_before(self):
fast = self.repo.fasts.by_id('fast:apostles')

Expand Down Expand Up @@ -271,7 +278,7 @@ def test_special_week_cheese_period(self):

def test_special_week_easter_period(self):
repo2023 = FastsRepository(2023, self.FASTS_DATA_PATH)
actual = repo2023.fasts.by_id('fast:easter')
actual = repo2023.fasts.by_id('fast:easter_week')

self.assertEqual(datetime(2023, 4, 17), actual.start)
self.assertEqual(datetime(2023, 4, 22), actual.end)
Expand All @@ -280,8 +287,8 @@ def test_special_week_trinity_period(self):
repo2023 = FastsRepository(2023, self.FASTS_DATA_PATH)
actual = repo2023.fasts.by_id('fast:trinity')

self.assertEqual(datetime(2023, 5, 22), actual.start)
self.assertEqual(datetime(2023, 5, 28), actual.end)
self.assertEqual(datetime(2023, 6, 5), actual.start)
self.assertEqual(datetime(2023, 6, 10), actual.end)


if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion data

0 comments on commit dbc74b9

Please sign in to comment.