Commits

Ian Cordasco committed 3f3edf3

Add tests around uritemplate.partial

  • Participants
  • Parent commits e9b5bc2

Comments (0)

Files changed (1)

File test_uritemplate.py

         l = str([1, 2, 3, 4])
         self.assertEqual(variable.list_test(l), False)
 
-    def test_list_test(self):
+    def test_list_of_tuples_test(self):
         l = [(1, 2), (3, 4)]
         self.assertEqual(variable.dict_test(l), False)
 
         self.assertEqual(expand(self.uri, {'endpoint': 'users'}),
                          'https://api.github.com/users')
 
+    def test_partial(self):
+        self.assertEqual(partial(self.uri), URITemplate(self.uri))
+        uri = self.uri + '/sigmavirus24{/other}'
+        self.assertEqual(
+            partial(uri, endpoint='users'),
+            URITemplate('https://api.github.com/users/sigmavirus24{/other}')
+            )
+
 
 if __name__ == '__main__':
     main()