Exemplo n.º 1
0
 def test_get(self):
     mgr = self.manager
     mgr._get = Mock()
     mgr.uri_base = "test"
     x = fakes.FakeException()
     x.id = "fakeid"
     mgr.get(x)
     expected = "/%s/%s" % ("test", x.id)
     mgr._get.assert_called_once_with(expected)
Exemplo n.º 2
0
 def test_delete(self):
     mgr = self.manager
     sav = mgr._delete
     mgr._delete = Mock()
     mgr.uri_base = "test"
     x = fakes.FakeException()
     x.id = "fakeid"
     mgr.delete(x)
     expected = "/%s/%s" % ("test", x.id)
     mgr._delete.assert_called_once_with(expected)
     mgr._delete = sav
Exemplo n.º 3
0
 def test_head(self):
     mgr = self.manager
     sav = mgr._head
     mgr._head = Mock()
     mgr.uri_base = "test"
     x = fakes.FakeException()
     x.id = "fakeid"
     mgr.head(x)
     expected = "/%s/%s" % ("test", x.id)
     mgr._head.assert_called_once_with(expected)
     mgr._head = sav