def test_version(self): with requests_mock.mock() as mock: mock.get(client.get_host(), text='{"version": "0.2.0"}') self.assertEqual(client.get_api_version(), "0.2.0")
def test_version(self): with requests_mock.mock() as mock: mock.get(raw.get_host() + "/", text=json.dumps({"version": "0.2.0"})) self.assertEqual(raw.get_api_version(), "0.2.0")