Skip to content

Commit

Permalink
fix test error 1
Browse files Browse the repository at this point in the history
  • Loading branch information
timizuoebideri1 committed May 4, 2022
1 parent 676decb commit c347c0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion plugins/module_utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,10 @@ def _create_object(self, nb_endpoint, data):
nb_obj = data
else:
try:
nb_obj = nb_endpoint.create(**data)
if isinstance(nb_endpoint, pynautobot.core.endpoint.DetailEndpoint):
nb_obj = nb_endpoint.create(data)
else:
nb_obj = nb_endpoint.create(**data)
except pynautobot.RequestError as e:
self._handle_errors(msg=e.error)

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/targets/regression-latest/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,4 +286,4 @@
- name: Assert that api_version fails
assert:
that:
- 'test_invalid_api_version["msg"] == "{\"detail\":\"Invalid version in \\\"Accept\\\" header. Supported versions are 1.2, 1.3\"}"'
- '"Invalid version" in test_invalid_api_version["msg"]'

0 comments on commit c347c0c

Please sign in to comment.