Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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'))
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 def test10_tags(self):
     """ should allow listing tags """
     tags = api.tags()["tags"]
     self.assertIn("api_test_tag", tags)
Exemplo n.º 5
0
 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)
Exemplo n.º 6
0
 def test10_tags(self):
     """ should allow listing tags """
     tags = api.tags()["tags"]
     self.assertIn("api_test_tag", tags)