Exemplo 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')
Exemplo n.º 2
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')
Exemplo 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/'))
Exemplo 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/'))