Coverage for tests/test_context.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.9.1, created at 2025-06-27 22:07 +0000

1from unittest import TestCase 

2from webapp.helpers import schedule_banner 

3 

4 

5class TestContextFunctions(TestCase): 

6 def test_schedule_banner(self): 

7 """ 

8 Test schedule banner should return True 

9 if provided dates are within the timeframe 

10 """ 

11 

12 # Case 1: dates passed, banner should be down 

13 self.assertFalse(schedule_banner("2021-02-28", "2022-02-28")) 

14 

15 # Case 2: dates did not pass, banner should be up 

16 self.assertTrue(schedule_banner("2023-02-28", "2100-02-28"))