Пример #1
0
 def test_dawn(self):
     assert brightness.brightness('Amsterdam', at=datetime.datetime(2015, 7, 1, 5, 20, 0)) is brightness.DAWN
     assert brightness.brightness('Amsterdam', at=datetime.datetime(2015, 1, 1, 8, 48, 0)) is brightness.DAWN
Пример #2
0
 def test_dusk(self):
     assert brightness.brightness('Amsterdam', at=datetime.datetime(2015, 7, 1, 22, 9, 0)) is brightness.DUSK
     assert brightness.brightness('Amsterdam', at=datetime.datetime(2015, 1, 1, 16, 39, 0)) is brightness.DUSK
Пример #3
0
 def test_night(self):
     assert brightness.brightness('Amsterdam', at=datetime.datetime(2015, 7, 1, 0, 0, 0)) is brightness.NIGHT
     assert brightness.brightness('Amsterdam', at=datetime.datetime(2015, 1, 1, 0, 0, 0)) is brightness.NIGHT
Пример #4
0
 def test_day(self):
     assert brightness.brightness('Amsterdam', at=datetime.datetime(2015, 7, 1, 5, 24, 0)) is brightness.DAY
     assert brightness.brightness('Amsterdam', at=datetime.datetime(2015, 1, 1, 8, 51, 0)) is brightness.DAY