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
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