Example #1
0
    def test_add_model_photo(self):
        client = Client("key", "value")
        params = {
            "file": "<FILE DATA>",
        }
        client.add_model_photo(86, params)
        client._post.assert_called()
        client._post.assert_called_with("/models/86/photos/", body=json.dumps(params))

        with self.assertRaises(Exception):
            client.add_model_photo(86, {})
Example #2
0
    def test_add_model_photo(self):
        client = Client("key", "value")
        params = {
            "file": "<FILE DATA>",
        }
        client.add_model_photo(86, params)
        client._post.assert_called()
        client._post.assert_called_with("/models/86/photos/",
                                        body=json.dumps(params))

        with self.assertRaises(Exception):
            client.add_model_photo(86, {})