コード例 #1
0
 def test_uri_from_username_wants_str(self):
     self.assertRaises(TypeError,
                       lambda: helpers.uri_from_username(self.mg, 4))
コード例 #2
0
 def test_uri_from_username_with_no_user(self):
     self.assertRaises(
         ValueError,
         lambda: helpers.uri_from_username(self.mg, 'NoSuchUser'))
コード例 #3
0
 def test_uri_from_username(self):
     assert helpers.uri_from_username(self.mg, 'test') == '/api/v1/user/1/'
コード例 #4
0
ファイル: tests.py プロジェクト: SteveViss/pymangal
 def test_uri_from_username_wants_str(self):
     self.assertRaises(TypeError, lambda : helpers.uri_from_username(self.mg, 4))
コード例 #5
0
ファイル: tests.py プロジェクト: SteveViss/pymangal
 def test_uri_from_username_with_no_user(self):
     self.assertRaises(ValueError, lambda : helpers.uri_from_username(self.mg, 'NoSuchUser'))
コード例 #6
0
ファイル: tests.py プロジェクト: SteveViss/pymangal
 def test_uri_from_username(self):
     assert helpers.uri_from_username(self.mg, 'test') == '/api/v1/user/1/'