Exemplo n.º 1
0
    def test_create_image_set(self, client):
        name, description = 'image set name', 'a description'
        api = m.ImageSetAPI(client)
        api.create_image_set(name=name)
        api.client.post.assert_called_with(api.base_url, json={'name': name})

        api.create_image_set(name=name, description=description)
        api.client.post.assert_called_with(api.base_url, json={
            'name': name,
            'description': description,
        })
Exemplo n.º 2
0
 def test_get_image_sets(self, client):
     api = m.ImageSetAPI(client)
     api.get_image_sets()
     api.client.get.assert_called_with(api.base_url)