コード例 #1
0
ファイル: test_api.py プロジェクト: MaorGariv/pycloudinary
 def test11_tags_prefix(self, mocker):
     """ should allow listing tag by prefix """
     mocker.return_value = MOCK_RESPONSE
     api.tags(prefix=API_TEST_PREFIX)
     args, kargs = mocker.call_args
     self.assertTrue(get_uri(args).endswith('/tags/image'))
     self.assertEqual(get_params(args)['prefix'], API_TEST_PREFIX)
コード例 #2
0
ファイル: test_api.py プロジェクト: MaorGariv/pycloudinary
 def test10_tags(self, mocker):
     """ should allow listing tags """
     mocker.return_value = MOCK_RESPONSE
     api.tags()
     args, kargs = mocker.call_args
     self.assertTrue(get_uri(args).endswith('/tags/image'))
コード例 #3
0
ファイル: api_test.py プロジェクト: nloadholtes/pycloudinary
 def test11_tags_prefix(self):
     """ should allow listing tag by prefix """
     tags = api.tags(prefix="api_test")["tags"]
     self.assertIn("api_test_tag", tags)
     tags = api.tags(prefix="api_test_no_such_tag")["tags"]
     self.assertEqual(len(tags), 0)
コード例 #4
0
ファイル: api_test.py プロジェクト: nloadholtes/pycloudinary
 def test10_tags(self):
     """ should allow listing tags """
     tags = api.tags()["tags"]
     self.assertIn("api_test_tag", tags)
コード例 #5
0
ファイル: api_test.py プロジェクト: tpof314/pycloudinary
 def test11_tags_prefix(self):
     """ should allow listing tag by prefix """
     tags = api.tags(prefix="api_test")["tags"]
     self.assertIn("api_test_tag", tags)
     tags = api.tags(prefix="api_test_no_such_tag")["tags"]
     self.assertEqual(len(tags), 0)
コード例 #6
0
ファイル: api_test.py プロジェクト: tpof314/pycloudinary
 def test10_tags(self):
     """ should allow listing tags """
     tags = api.tags()["tags"]
     self.assertIn("api_test_tag", tags)