def test_delete_(self): httpc.put(self.base_url() + 'killme', data='killme') status, msg, body = httpc.delete_(self.base_url() + 'killme') self.assertEquals(status, 204) self.assertRaises( httpc.NotFound, lambda: httpc.get(self.base_url() + 'killme'))
def test_delete(self): httpc.put(self.base_url() + 'killme', data='killme') self.assertEquals(httpc.delete(self.base_url() + 'killme'), '') self.assertRaises(httpc.NotFound, lambda: httpc.get(self.base_url() + 'killme'))
def test_delete_(self): httpc.put(self.base_url() + 'killme', data='killme') status, msg, body = httpc.delete_(self.base_url() + 'killme') self.assertEquals(status, 204) self.assertRaises(httpc.NotFound, lambda: httpc.get(self.base_url() + 'killme'))
def test_put_nonempty(self): data = 'nonempty' httpc.put(self.base_url() + 'nonempty', data=data) self.assertEquals(httpc.get(self.base_url() + 'nonempty'), data)
def test_put_empty(self): httpc.put(self.base_url() + 'empty', data='') self.assertEquals(httpc.get(self.base_url() + 'empty'), '')
def test_put_bad_uri(self): self.assertRaises(httpc.BadRequest, lambda: httpc.put(self.base_url() + '', data=''))
def test_delete(self): httpc.put(self.base_url() + 'killme', data='killme') self.assertEquals(httpc.delete(self.base_url() + 'killme'), '') self.assertRaises( httpc.NotFound, lambda: httpc.get(self.base_url() + 'killme'))
def test_put_bad_uri(self): self.assertRaises( httpc.BadRequest, lambda: httpc.put(self.base_url() + '', data=''))