A mirror of dcurooms found at https://github.com/theycallmemac/dcurooms
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
484 B

  1. import unittest
  2. import sys
  3. import datetime
  4. import os
  5. sys.path.append('.')
  6. from scripts.utils import get_current_time
  7. class RequiredTestCase(unittest.TestCase):
  8. def test_time(self):
  9. now = get_current_time(datetime.datetime.now())
  10. hr = int(now[2]) + 2
  11. mn = int(now[3])
  12. hr_d = datetime.datetime.now().hour
  13. mn_d = datetime.datetime.now().minute
  14. self.assertTrue(hr == hr_d and mn == mn_d)
  15. if __name__ == '__main__':
  16. unittest.main()