Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
479e0f8
commit d5b32fa
Showing
7 changed files
with
101 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from datetime import time | ||
|
||
from django.test import TestCase | ||
from django.utils.translation import ugettext as _ | ||
|
||
from .factories import LiturgyFactory | ||
|
||
|
||
class LiturgyTests(TestCase): | ||
|
||
def test_part_of_day(self): | ||
liturgy1 = LiturgyFactory.build(service__time=time(9, 30)) | ||
liturgy2 = LiturgyFactory.build(service__time=time(11, 30)) | ||
liturgy3 = LiturgyFactory.build(service__time=time(16, 00)) | ||
liturgy4 = LiturgyFactory.build(service__time=time(17, 00)) | ||
|
||
self.assertEqual(liturgy1.part_of_day, _('morning')) | ||
self.assertEqual(liturgy2.part_of_day, _('morning')) | ||
self.assertEqual(liturgy3.part_of_day, _('afternoon')) | ||
self.assertEqual(liturgy4.part_of_day, _('evening')) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters