Exemple #1
0
 def test_init_error(self):
     """Test that we get a TypeError given bad arguments to ClientBase()"""
     # XXX: I(zenhack) think this test is of dubious utility; At some point
     # during review, Sahil had some explicit logic to throw this error, but
     # we got rid of that. Arguably we should remove this, but I want to do
     # so in a separate patch, so just noting it now.
     with pytest.raises(TypeError):
         ClientBase()
Exemple #2
0
 def test_object_url(self):
     """Test the object_url method."""
     x = ClientBase(ep, 'some_base64_string')
     y = x.object_url('abc', '123', 'xy23z')
     assert y == 'http://127.0.0.1:8000/abc/123/xy23z'
Exemple #3
0
 def test_object_url(self):
     """Test the object_url method."""
     x = ClientBase(ep, 'some_base64_string')
     y = x.object_url('abc', '123', 'xy23z')
     assert y == 'http://127.0.0.1:8000/v0/abc/123/xy23z'
Exemple #4
0
 def test_init_error(self):
     with pytest.raises(TypeError):
         x = ClientBase()