def test_should_add_AvatarResource(self, api_mock): api_instance_mock = self.mock.MagicMock() api_mock.return_value = api_instance_mock api.create_api(self.app_mock) self.assertTrue( any(mock_call == base.call(api.resources.AvatarResource, '/api/account/avatar') for mock_call in api_instance_mock.add_resource.mock_calls))
def test_should_add_HealthCheckResource(self, api_mock): api_instance_mock = self.mock.MagicMock() api_mock.return_value = api_instance_mock api.create_api(self.app_mock) self.assertTrue( any(mock_call == base.call(api.resources.HealthCheckResource, '/api/healthcheck') for mock_call in api_instance_mock.add_resource.mock_calls))
def test_should_add_NoteResource(self, api_mock): api_instance_mock = self.mock.MagicMock() api_mock.return_value = api_instance_mock api.create_api(self.app_mock) self.assertTrue( any(mock_call == base.call(api.resources.NoteResource, '/api/notes', '/api/notes/<int:note_id>') for mock_call in api_instance_mock.add_resource.mock_calls))