Esempio n. 1
0
 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())
   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')
Esempio n. 3
0
 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/'))
Esempio n. 4
0
 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/'))