def setUp(self): self.repeater = Dhis2Repeater.wrap({ "domain": "test-domain", "url": "https://dhis2.example.com/", "username": "******", "password": "******", })
def test_major_minor(self): repeater = Dhis2Repeater.wrap({ "dhis2_version": "2.31", "dhis2_version_last_modified": self.just_now, }) self.assertEqual(repeater.get_api_version(), 31)
def test_blank_raises_exception(self): repeater = Dhis2Repeater.wrap({ "dhis2_version": "", "dhis2_version_last_modified": self.just_now, }) with self.assertRaises(Dhis2Exception): repeater.get_api_version()