def test_delete(self): client = atom.client.AtomPubClient(atom.mock_http_core.EchoHttpClient()) response = client.Delete('http://example.com/simple') self.assert_(response.getheader('Echo-Host') == 'example.com:None') self.assert_(response.getheader('Echo-Uri') == '/simple') self.assert_(response.getheader('Echo-Method') == 'DELETE') response = client.delete(uri='http://example.com/d') self.assert_(response.getheader('Echo-Uri') == '/d') self.assert_(response.getheader('Echo-Method') == 'DELETE')
def test_delete(self): client = atom.client.AtomPubClient(atom.mock_http_core.EchoHttpClient(), source='my new app') response = client.Delete('http://example.com/simple') self.assertEqual(response.getheader('Echo-Host'), 'example.com:None') self.assertEqual(response.getheader('Echo-Uri'), '/simple') self.assertEqual(response.getheader('Echo-Method'), 'DELETE') response = client.delete(uri='http://example.com/d') self.assertEqual(response.getheader('Echo-Uri'), '/d') self.assertEqual(response.getheader('Echo-Method'), 'DELETE') self.assertTrue( response.getheader('User-Agent').startswith('my new app gdata-py/'))
def test_delete(self): client = atom.client.AtomPubClient(atom.mock_http_core.EchoHttpClient(), source='my new app') response = client.Delete('http://example.com/simple') self.assertEqual(response.getheader('Echo-Host'), 'example.com:None') self.assertEqual(response.getheader('Echo-Uri'), '/simple') self.assertEqual(response.getheader('Echo-Method'), 'DELETE') response = client.delete(uri='http://example.com/d') self.assertEqual(response.getheader('Echo-Uri'), '/d') self.assertEqual(response.getheader('Echo-Method'), 'DELETE') self.assert_( response.getheader('User-Agent').startswith('my new app gdata-py/'))