def test_tilt_calculation_initial(self):
     mock = DeviceMock('👨‍🏫')
     blind = Blind('👨‍🎓', 10, 20, mock, [], [])
     blind.override_tilt_duration(
         90)  # Makes calculation for checks much more easy =)
     # starting from 90
     blind.tilt(0)
     self.assertEqual(90, mock.time)
     self.assertEqual('open', mock.direction)
 def test_tilt_calculation_close(self):
     mock = DeviceMock('👨‍🏫')
     blind = Blind('👨‍🎓', 10, 20, mock, [], [])
     blind.override_tilt_duration(
         90)  # Makes calculation for checks much more easy =)
     blind.close()
     self.assertEqual(State.CLOSED, mock.stats())
     blind.tilt(0)
     self.assertEqual(90, mock.time)
     self.assertEqual('open', mock.direction)