def test_getting_maintenance_records_when_response_is_ok_and_showing_all_records( self): api = AtmosphereAPI('token', base_url=self.mock_users_base_url) response = api.get_maintenance_records(show_all=True) assert response.ok assert response.message['count'] == 18 and response.message['results'][ 0]['title'] == '8/14/18 - v33 deployment'
def test_getting_maintenance_records_when_response_is_ok(self): api = AtmosphereAPI('token', base_url=self.mock_users_base_url) response = api.get_maintenance_records() assert response.ok assert response.message['count'] == 0 and len( response.message['results']) == 0
def test_getting_maintenance_records_when_response_is_not_ok(self): api = AtmosphereAPI('token', base_url=self.mock_users_bad_base_url) response = api.get_maintenance_records() assert not response.ok