Ejemplo n.º 1
0
 def test_uri_from_username_wants_str(self):
     self.assertRaises(TypeError,
                       lambda: helpers.uri_from_username(self.mg, 4))
Ejemplo n.º 2
0
 def test_uri_from_username_with_no_user(self):
     self.assertRaises(
         ValueError,
         lambda: helpers.uri_from_username(self.mg, 'NoSuchUser'))
Ejemplo n.º 3
0
 def test_uri_from_username(self):
     assert helpers.uri_from_username(self.mg, 'test') == '/api/v1/user/1/'
Ejemplo n.º 4
0
 def test_uri_from_username_wants_str(self):
     self.assertRaises(TypeError, lambda : helpers.uri_from_username(self.mg, 4))
Ejemplo n.º 5
0
 def test_uri_from_username_with_no_user(self):
     self.assertRaises(ValueError, lambda : helpers.uri_from_username(self.mg, 'NoSuchUser'))
Ejemplo n.º 6
0
 def test_uri_from_username(self):
     assert helpers.uri_from_username(self.mg, 'test') == '/api/v1/user/1/'