def test_delete_with_id_nonexistent(self): system = LogSearchSystem() system.save() nonexistent_id = system.id system.delete() response = self._delete(nonexistent_id) self.assertEquals(response.status_code, httplib.NOT_FOUND)
def test_get_with_id_nonexsitent(self): system = LogSearchSystem(type='groonga', base_url='http://search.example.com/#!/tables/Logs/search') system.save() id = system.id system.delete() response = self._get(id) self.assertEquals(response.status_code, httplib.NOT_FOUND)
def test_put_with_id_nonexistent(self): system = LogSearchSystem(type='groonga', base_url='http://search.example.com/#!/tables/Logs/search') system.save() nonexistent_id = system.id system.delete() record = { 'type': 'other', 'base_url': 'http://search.example.net/', } response = self._put(nonexistent_id, record) self.assertEquals(response.status_code, httplib.NOT_FOUND)