def test_add_model_file(self): client = Client("key", "value") params = { "file": "<FILE DATA>", "fileName": "file.ext", "hasRightsToModel": True, "acceptTermsAndConditions": True, } client.add_model_file(86, params) client._post.assert_called() client._post.assert_called_with("/models/86/files/", body=json.dumps(params)) params = { "file": "<FILE DATA>", "hasRightsToModel": True, } with self.assertRaises(Exception): client.add_model_file(86, params)