Skip to content

Instantly share code, notes, and snippets.

@bcdonadio
Last active June 14, 2023 19:22
Show Gist options
  • Save bcdonadio/0eae2813c5fde0d1986036afa871b703 to your computer and use it in GitHub Desktop.
Save bcdonadio/0eae2813c5fde0d1986036afa871b703 to your computer and use it in GitHub Desktop.
Unit test results of netbox-3.5.3 + netbox-inventory-1.3.2
| Found 5797 test(s).
| Creating test database for alias 'default'...
| System check identified no issues (0 silenced).
| .....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................FF.................................................................................................................................................................FF......................................FF..........................................................FF.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ssssssssssssssssss...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................Unable to delete object. 1 dependent objects were found: 192.0.2.0/24 (24)
| ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................./opt/netbox/netbox/ipam/filtersets.py: Warning [FHRPGroupViewSet > FHRPGroupFilterSet]: Unable to guess choice types from values, filter method's type hint or find "related_ip" in model. Defaulting to string.
| /opt/netbox/netbox/ipam/filtersets.py: Warning [IPAddressViewSet > IPAddressFilterSet]: Unable to guess choice types from values, filter method's type hint or find "present_in_vrf_id" in model. Defaulting to string.
| /opt/netbox/netbox/ipam/filtersets.py: Warning [IPAddressViewSet > IPAddressFilterSet]: Unable to guess choice types from values, filter method's type hint or find "present_in_vrf" in model. Defaulting to string.
| /opt/netbox/netbox/ipam/filtersets.py: Warning [PrefixViewSet > PrefixFilterSet]: Unable to guess choice types from values, filter method's type hint or find "present_in_vrf_id" in model. Defaulting to string.
| /opt/netbox/netbox/ipam/filtersets.py: Warning [PrefixViewSet > PrefixFilterSet]: Unable to guess choice types from values, filter method's type hint or find "present_in_vrf" in model. Defaulting to string.
| /opt/netbox/netbox/ipam/filtersets.py: Warning [ServiceViewSet > ServiceFilterSet]: model field "IPAddressField" has no mapping in ModelSerializer. It may be a deprecated field. Defaulting to "string"
| /opt/netbox/netbox/ipam/filtersets.py: Warning [VLANViewSet > VLANFilterSet]: Unable to guess choice types from values, filter method's type hint or find "available_on_device" in model. Defaulting to string.
| /opt/netbox/netbox/ipam/filtersets.py: Warning [VLANViewSet > VLANFilterSet]: Unable to guess choice types from values, filter method's type hint or find "available_on_virtualmachine" in model. Defaulting to string.
| /opt/netbox/venv/lib/python3.11/site-packages/netbox_inventory/api/serializers.py: Warning [AssetViewSet > AssetSerializer]: unable to resolve type hint for function "kind". Consider using a type hint or @extend_schema_field. Defaulting to string.
| ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
| ────────────────────────────────────────────────────────────────────────────────
| FAIL: test_graphql_get_object
| (dcim.tests.test_api.DeviceTest.test_graphql_get_object)
| ────────────────────────────────────────────────────────────────────────────────
| ╭───────────────────── Traceback (most recent call last) ──────────────────────╮
| │ /opt/netbox/venv/lib/python3.11/site-packages/django/test/utils.py:460 in │
| │ inner │
| │ │
| │ /opt/netbox/venv/lib/python3.11/site-packages/django/test/utils.py:460 in │
| │ inner │
| │ │
| │ /opt/netbox/netbox/utilities/testing/api.py:502 in test_graphql_get_object │
| │ │
| │ 499 │ │ │ obj_perm.object_types.add(ContentType.objects.get_for_mode │
| │ 500 │ │ │ │
| │ 501 │ │ │ response = self.client.post(url, data={'query': query}, ** │
| │ ❱ 502 │ │ │ self.assertHttpStatus(response, status.HTTP_200_OK) │
| │ 503 │ │ │ data = json.loads(response.content) │
| │ 504 │ │ │ self.assertNotIn('errors', data) │
| │ 505 │
| │ │
| │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
| │ │ field_name = 'device' │ │
| │ │ obj_perm = <ObjectPermission: Test permission> │ │
| │ │ object_id = 14 │ │
| │ │ query = '\n {\n device(id:14) {\n │ │
| │ │ id\ncreated\nla'+894 │ │
| │ │ response = <HttpResponse status_code=400, "application/json"> │ │
| │ │ self = <dcim.tests.test_api.DeviceTest │ │
| │ │ testMethod=test_graphql_get_object> │ │
| │ │ url = '/graphql/' │ │
| │ ╰──────────────────────────────────────────────────────────────────────────╯ │
| │ │
| │ /opt/netbox/netbox/utilities/testing/base.py:71 in assertHttpStatus │
| │ │
| │ 68 │ │ │ │ form_errors = extract_form_failures(response.content) │
| │ 69 │ │ │ │ err = form_errors or response.content or 'No data' │
| │ 70 │ │ │ err_message = f"Expected HTTP status {expected_status}; re │
| │ ❱ 71 │ │ self.assertEqual(response.status_code, expected_status, err_me │
| │ 72 │
| │ 73 │
| │ 74 class ModelTestCase(TestCase): │
| │ │
| │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
| │ │ err = b'{"errors":[{"message":"Cannot query field │ │
| │ │ \'assigned_asset\' on type \'DeviceType\'.'+42 │ │
| │ │ err_message = 'Expected HTTP status 200; received 400: │ │
| │ │ b\'{"errors":[{"message":"Cannot query fi'+89 │ │
| │ │ expected_status = 200 │ │
| │ │ form_errors = [] │ │
| │ │ response = <HttpResponse status_code=400, "application/json"> │ │
| │ │ self = <dcim.tests.test_api.DeviceTest │ │
| │ │ testMethod=test_graphql_get_object> │ │
| │ ╰──────────────────────────────────────────────────────────────────────────╯ │
| │ │
| │ /usr/lib/python3.11/unittest/case.py:873 in assertEqual │
| │ │
| │ /usr/lib/python3.11/unittest/case.py:866 in _baseAssertEqual │
| ╰──────────────────────────────────────────────────────────────────────────────╯
| AssertionError: 400 != 200 : Expected HTTP status 200; received 400:
| b'{"errors":[{"message":"Cannot query field \'assigned_asset\' on type
| \'DeviceType\'.","locations":[{"line":50,"column":24}]}]}'
|
| ────────────────────────────────────────────────────────────────────────────────
| FAIL: test_graphql_list_objects
| (dcim.tests.test_api.DeviceTest.test_graphql_list_objects)
| ────────────────────────────────────────────────────────────────────────────────
| ╭───────────────────── Traceback (most recent call last) ──────────────────────╮
| │ /opt/netbox/venv/lib/python3.11/site-packages/django/test/utils.py:460 in │
| │ inner │
| │ │
| │ /opt/netbox/venv/lib/python3.11/site-packages/django/test/utils.py:460 in │
| │ inner │
| │ │
| │ /opt/netbox/netbox/utilities/testing/api.py:527 in test_graphql_list_objects │
| │ │
| │ 524 │ │ │ obj_perm.object_types.add(ContentType.objects.get_for_mode │
| │ 525 │ │ │ │
| │ 526 │ │ │ response = self.client.post(url, data={'query': query}, ** │
| │ ❱ 527 │ │ │ self.assertHttpStatus(response, status.HTTP_200_OK) │
| │ 528 │ │ │ data = json.loads(response.content) │
| │ 529 │ │ │ self.assertNotIn('errors', data) │
| │ 530 │ │ │ self.assertGreater(len(data['data'][field_name]), 0) │
| │ │
| │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
| │ │ field_name = 'device_list' │ │
| │ │ obj_perm = <ObjectPermission: Test permission> │ │
| │ │ query = '\n {\n device_list {\n │ │
| │ │ id\ncreated\nlast'+892 │ │
| │ │ response = <HttpResponse status_code=400, "application/json"> │ │
| │ │ self = <dcim.tests.test_api.DeviceTest │ │
| │ │ testMethod=test_graphql_list_objects> │ │
| │ │ url = '/graphql/' │ │
| │ ╰──────────────────────────────────────────────────────────────────────────╯ │
| │ │
| │ /opt/netbox/netbox/utilities/testing/base.py:71 in assertHttpStatus │
| │ │
| │ 68 │ │ │ │ form_errors = extract_form_failures(response.content) │
| │ 69 │ │ │ │ err = form_errors or response.content or 'No data' │
| │ 70 │ │ │ err_message = f"Expected HTTP status {expected_status}; re │
| │ ❱ 71 │ │ self.assertEqual(response.status_code, expected_status, err_me │
| │ 72 │
| │ 73 │
| │ 74 class ModelTestCase(TestCase): │
| │ │
| │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
| │ │ err = b'{"errors":[{"message":"Cannot query field │ │
| │ │ \'assigned_asset\' on type \'DeviceType\'.'+42 │ │
| │ │ err_message = 'Expected HTTP status 200; received 400: │ │
| │ │ b\'{"errors":[{"message":"Cannot query fi'+89 │ │
| │ │ expected_status = 200 │ │
| │ │ form_errors = [] │ │
| │ │ response = <HttpResponse status_code=400, "application/json"> │ │
| │ │ self = <dcim.tests.test_api.DeviceTest │ │
| │ │ testMethod=test_graphql_list_objects> │ │
| │ ╰──────────────────────────────────────────────────────────────────────────╯ │
| │ │
| │ /usr/lib/python3.11/unittest/case.py:873 in assertEqual │
| │ │
| │ /usr/lib/python3.11/unittest/case.py:866 in _baseAssertEqual │
| ╰──────────────────────────────────────────────────────────────────────────────╯
| AssertionError: 400 != 200 : Expected HTTP status 200; received 400:
| b'{"errors":[{"message":"Cannot query field \'assigned_asset\' on type
| \'DeviceType\'.","locations":[{"line":50,"column":24}]}]}'
|
| ────────────────────────────────────────────────────────────────────────────────
| FAIL: test_graphql_get_object
| (dcim.tests.test_api.InventoryItemTest.test_graphql_get_object)
| ────────────────────────────────────────────────────────────────────────────────
| ╭───────────────────── Traceback (most recent call last) ──────────────────────╮
| │ /opt/netbox/venv/lib/python3.11/site-packages/django/test/utils.py:460 in │
| │ inner │
| │ │
| │ /opt/netbox/venv/lib/python3.11/site-packages/django/test/utils.py:460 in │
| │ inner │
| │ │
| │ /opt/netbox/netbox/utilities/testing/api.py:502 in test_graphql_get_object │
| │ │
| │ 499 │ │ │ obj_perm.object_types.add(ContentType.objects.get_for_mode │
| │ 500 │ │ │ │
| │ 501 │ │ │ response = self.client.post(url, data={'query': query}, ** │
| │ ❱ 502 │ │ │ self.assertHttpStatus(response, status.HTTP_200_OK) │
| │ 503 │ │ │ data = json.loads(response.content) │
| │ 504 │ │ │ self.assertNotIn('errors', data) │
| │ 505 │
| │ │
| │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
| │ │ field_name = 'inventory_item' │ │
| │ │ obj_perm = <ObjectPermission: Test permission> │ │
| │ │ object_id = 1 │ │
| │ │ query = '\n {\n inventory_item(id:1) {\n │ │
| │ │ id\ncre'+332 │ │
| │ │ response = <HttpResponse status_code=400, "application/json"> │ │
| │ │ self = <dcim.tests.test_api.InventoryItemTest │ │
| │ │ testMethod=test_graphql_get_object> │ │
| │ │ url = '/graphql/' │ │
| │ ╰──────────────────────────────────────────────────────────────────────────╯ │
| │ │
| │ /opt/netbox/netbox/utilities/testing/base.py:71 in assertHttpStatus │
| │ │
| │ 68 │ │ │ │ form_errors = extract_form_failures(response.content) │
| │ 69 │ │ │ │ err = form_errors or response.content or 'No data' │
| │ 70 │ │ │ err_message = f"Expected HTTP status {expected_status}; re │
| │ ❱ 71 │ │ self.assertEqual(response.status_code, expected_status, err_me │
| │ 72 │
| │ 73 │
| │ 74 class ModelTestCase(TestCase): │
| │ │
| │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
| │ │ err = b'{"errors":[{"message":"Cannot query field │ │
| │ │ \'assigned_asset\' on type \'InventoryIte'+49 │ │
| │ │ err_message = 'Expected HTTP status 200; received 400: │ │
| │ │ b\'{"errors":[{"message":"Cannot query fi'+96 │ │
| │ │ expected_status = 200 │ │
| │ │ form_errors = [] │ │
| │ │ response = <HttpResponse status_code=400, "application/json"> │ │
| │ │ self = <dcim.tests.test_api.InventoryItemTest │ │
| │ │ testMethod=test_graphql_get_object> │ │
| │ ╰──────────────────────────────────────────────────────────────────────────╯ │
| │ │
| │ /usr/lib/python3.11/unittest/case.py:873 in assertEqual │
| │ │
| │ /usr/lib/python3.11/unittest/case.py:866 in _baseAssertEqual │
| ╰──────────────────────────────────────────────────────────────────────────────╯
| AssertionError: 400 != 200 : Expected HTTP status 200; received 400:
| b'{"errors":[{"message":"Cannot query field \'assigned_asset\' on type
| \'InventoryItemType\'.","locations":[{"line":25,"column":19}]}]}'
|
| ────────────────────────────────────────────────────────────────────────────────
| FAIL: test_graphql_list_objects
| (dcim.tests.test_api.InventoryItemTest.test_graphql_list_objects)
| ────────────────────────────────────────────────────────────────────────────────
| ╭───────────────────── Traceback (most recent call last) ──────────────────────╮
| │ /opt/netbox/venv/lib/python3.11/site-packages/django/test/utils.py:460 in │
| │ inner │
| │ │
| │ /opt/netbox/venv/lib/python3.11/site-packages/django/test/utils.py:460 in │
| │ inner │
| │ │
| │ /opt/netbox/netbox/utilities/testing/api.py:527 in test_graphql_list_objects │
| │ │
| │ 524 │ │ │ obj_perm.object_types.add(ContentType.objects.get_for_mode │
| │ 525 │ │ │ │
| │ 526 │ │ │ response = self.client.post(url, data={'query': query}, ** │
| │ ❱ 527 │ │ │ self.assertHttpStatus(response, status.HTTP_200_OK) │
| │ 528 │ │ │ data = json.loads(response.content) │
| │ 529 │ │ │ self.assertNotIn('errors', data) │
| │ 530 │ │ │ self.assertGreater(len(data['data'][field_name]), 0) │
| │ │
| │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
| │ │ field_name = 'inventory_item_list' │ │
| │ │ obj_perm = <ObjectPermission: Test permission> │ │
| │ │ query = '\n {\n inventory_item_list {\n │ │
| │ │ id\ncrea'+331 │ │
| │ │ response = <HttpResponse status_code=400, "application/json"> │ │
| │ │ self = <dcim.tests.test_api.InventoryItemTest │ │
| │ │ testMethod=test_graphql_list_objects> │ │
| │ │ url = '/graphql/' │ │
| │ ╰──────────────────────────────────────────────────────────────────────────╯ │
| │ │
| │ /opt/netbox/netbox/utilities/testing/base.py:71 in assertHttpStatus │
| │ │
| │ 68 │ │ │ │ form_errors = extract_form_failures(response.content) │
| │ 69 │ │ │ │ err = form_errors or response.content or 'No data' │
| │ 70 │ │ │ err_message = f"Expected HTTP status {expected_status}; re │
| │ ❱ 71 │ │ self.assertEqual(response.status_code, expected_status, err_me │
| │ 72 │
| │ 73 │
| │ 74 class ModelTestCase(TestCase): │
| │ │
| │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
| │ │ err = b'{"errors":[{"message":"Cannot query field │ │
| │ │ \'assigned_asset\' on type \'InventoryIte'+49 │ │
| │ │ err_message = 'Expected HTTP status 200; received 400: │ │
| │ │ b\'{"errors":[{"message":"Cannot query fi'+96 │ │
| │ │ expected_status = 200 │ │
| │ │ form_errors = [] │ │
| │ │ response = <HttpResponse status_code=400, "application/json"> │ │
| │ │ self = <dcim.tests.test_api.InventoryItemTest │ │
| │ │ testMethod=test_graphql_list_objects> │ │
| │ ╰──────────────────────────────────────────────────────────────────────────╯ │
| │ │
| │ /usr/lib/python3.11/unittest/case.py:873 in assertEqual │
| │ │
| │ /usr/lib/python3.11/unittest/case.py:866 in _baseAssertEqual │
| ╰──────────────────────────────────────────────────────────────────────────────╯
| AssertionError: 400 != 200 : Expected HTTP status 200; received 400:
| b'{"errors":[{"message":"Cannot query field \'assigned_asset\' on type
| \'InventoryItemType\'.","locations":[{"line":25,"column":19}]}]}'
|
| ────────────────────────────────────────────────────────────────────────────────
| FAIL: test_graphql_get_object
| (dcim.tests.test_api.ManufacturerTest.test_graphql_get_object)
| ────────────────────────────────────────────────────────────────────────────────
| ╭───────────────────── Traceback (most recent call last) ──────────────────────╮
| │ /opt/netbox/venv/lib/python3.11/site-packages/django/test/utils.py:460 in │
| │ inner │
| │ │
| │ /opt/netbox/venv/lib/python3.11/site-packages/django/test/utils.py:460 in │
| │ inner │
| │ │
| │ /opt/netbox/netbox/utilities/testing/api.py:502 in test_graphql_get_object │
| │ │
| │ 499 │ │ │ obj_perm.object_types.add(ContentType.objects.get_for_mode │
| │ 500 │ │ │ │
| │ 501 │ │ │ response = self.client.post(url, data={'query': query}, ** │
| │ ❱ 502 │ │ │ self.assertHttpStatus(response, status.HTTP_200_OK) │
| │ 503 │ │ │ data = json.loads(response.content) │
| │ 504 │ │ │ self.assertNotIn('errors', data) │
| │ 505 │
| │ │
| │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
| │ │ field_name = 'manufacturer' │ │
| │ │ obj_perm = <ObjectPermission: Test permission> │ │
| │ │ object_id = 19 │ │
| │ │ query = '\n {\n manufacturer(id:19) {\n │ │
| │ │ id\ncrea'+319 │ │
| │ │ response = <HttpResponse status_code=400, "application/json"> │ │
| │ │ self = <dcim.tests.test_api.ManufacturerTest │ │
| │ │ testMethod=test_graphql_get_object> │ │
| │ │ url = '/graphql/' │ │
| │ ╰──────────────────────────────────────────────────────────────────────────╯ │
| │ │
| │ /opt/netbox/netbox/utilities/testing/base.py:71 in assertHttpStatus │
| │ │
| │ 68 │ │ │ │ form_errors = extract_form_failures(response.content) │
| │ 69 │ │ │ │ err = form_errors or response.content or 'No data' │
| │ 70 │ │ │ err_message = f"Expected HTTP status {expected_status}; re │
| │ ❱ 71 │ │ self.assertEqual(response.status_code, expected_status, err_me │
| │ 72 │
| │ 73 │
| │ 74 class ModelTestCase(TestCase): │
| │ │
| │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
| │ │ err = b'{"errors":[{"message":"Cannot query field │ │
| │ │ \'inventoryitem_types\' on type \'Manufac'+115 │ │
| │ │ err_message = 'Expected HTTP status 200; received 400: │ │
| │ │ b\'{"errors":[{"message":"Cannot query fi'+166 │ │
| │ │ expected_status = 200 │ │
| │ │ form_errors = [] │ │
| │ │ response = <HttpResponse status_code=400, "application/json"> │ │
| │ │ self = <dcim.tests.test_api.ManufacturerTest │ │
| │ │ testMethod=test_graphql_get_object> │ │
| │ ╰──────────────────────────────────────────────────────────────────────────╯ │
| │ │
| │ /usr/lib/python3.11/unittest/case.py:873 in assertEqual │
| │ │
| │ /usr/lib/python3.11/unittest/case.py:866 in _baseAssertEqual │
| ╰──────────────────────────────────────────────────────────────────────────────╯
| AssertionError: 400 != 200 : Expected HTTP status 200; received 400:
| b'{"errors":[{"message":"Cannot query field \'inventoryitem_types\' on type
| \'ManufacturerType\'. Did you mean \'inventory_item_templates\' or
| \'inventory_items\'?","locations":[{"line":16,"column":17}]}]}'
|
| ────────────────────────────────────────────────────────────────────────────────
| FAIL: test_graphql_list_objects
| (dcim.tests.test_api.ManufacturerTest.test_graphql_list_objects)
| ────────────────────────────────────────────────────────────────────────────────
| ╭───────────────────── Traceback (most recent call last) ──────────────────────╮
| │ /opt/netbox/venv/lib/python3.11/site-packages/django/test/utils.py:460 in │
| │ inner │
| │ │
| │ /opt/netbox/venv/lib/python3.11/site-packages/django/test/utils.py:460 in │
| │ inner │
| │ │
| │ /opt/netbox/netbox/utilities/testing/api.py:527 in test_graphql_list_objects │
| │ │
| │ 524 │ │ │ obj_perm.object_types.add(ContentType.objects.get_for_mode │
| │ 525 │ │ │ │
| │ 526 │ │ │ response = self.client.post(url, data={'query': query}, ** │
| │ ❱ 527 │ │ │ self.assertHttpStatus(response, status.HTTP_200_OK) │
| │ 528 │ │ │ data = json.loads(response.content) │
| │ 529 │ │ │ self.assertNotIn('errors', data) │
| │ 530 │ │ │ self.assertGreater(len(data['data'][field_name]), 0) │
| │ │
| │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
| │ │ field_name = 'manufacturer_list' │ │
| │ │ obj_perm = <ObjectPermission: Test permission> │ │
| │ │ query = '\n {\n manufacturer_list {\n │ │
| │ │ id\ncreate'+317 │ │
| │ │ response = <HttpResponse status_code=400, "application/json"> │ │
| │ │ self = <dcim.tests.test_api.ManufacturerTest │ │
| │ │ testMethod=test_graphql_list_objects> │ │
| │ │ url = '/graphql/' │ │
| │ ╰──────────────────────────────────────────────────────────────────────────╯ │
| │ │
| │ /opt/netbox/netbox/utilities/testing/base.py:71 in assertHttpStatus │
| │ │
| │ 68 │ │ │ │ form_errors = extract_form_failures(response.content) │
| │ 69 │ │ │ │ err = form_errors or response.content or 'No data' │
| │ 70 │ │ │ err_message = f"Expected HTTP status {expected_status}; re │
| │ ❱ 71 │ │ self.assertEqual(response.status_code, expected_status, err_me │
| │ 72 │
| │ 73 │
| │ 74 class ModelTestCase(TestCase): │
| │ │
| │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
| │ │ err = b'{"errors":[{"message":"Cannot query field │ │
| │ │ \'inventoryitem_types\' on type \'Manufac'+115 │ │
| │ │ err_message = 'Expected HTTP status 200; received 400: │ │
| │ │ b\'{"errors":[{"message":"Cannot query fi'+166 │ │
| │ │ expected_status = 200 │ │
| │ │ form_errors = [] │ │
| │ │ response = <HttpResponse status_code=400, "application/json"> │ │
| │ │ self = <dcim.tests.test_api.ManufacturerTest │ │
| │ │ testMethod=test_graphql_list_objects> │ │
| │ ╰──────────────────────────────────────────────────────────────────────────╯ │
| │ │
| │ /usr/lib/python3.11/unittest/case.py:873 in assertEqual │
| │ │
| │ /usr/lib/python3.11/unittest/case.py:866 in _baseAssertEqual │
| ╰──────────────────────────────────────────────────────────────────────────────╯
| AssertionError: 400 != 200 : Expected HTTP status 200; received 400:
| b'{"errors":[{"message":"Cannot query field \'inventoryitem_types\' on type
| \'ManufacturerType\'. Did you mean \'inventory_item_templates\' or
| \'inventory_items\'?","locations":[{"line":16,"column":17}]}]}'
|
| ────────────────────────────────────────────────────────────────────────────────
| FAIL: test_graphql_get_object
| (dcim.tests.test_api.ModuleTest.test_graphql_get_object)
| ────────────────────────────────────────────────────────────────────────────────
| ╭───────────────────── Traceback (most recent call last) ──────────────────────╮
| │ /opt/netbox/venv/lib/python3.11/site-packages/django/test/utils.py:460 in │
| │ inner │
| │ │
| │ /opt/netbox/venv/lib/python3.11/site-packages/django/test/utils.py:460 in │
| │ inner │
| │ │
| │ /opt/netbox/netbox/utilities/testing/api.py:502 in test_graphql_get_object │
| │ │
| │ 499 │ │ │ obj_perm.object_types.add(ContentType.objects.get_for_mode │
| │ 500 │ │ │ │
| │ 501 │ │ │ response = self.client.post(url, data={'query': query}, ** │
| │ ❱ 502 │ │ │ self.assertHttpStatus(response, status.HTTP_200_OK) │
| │ 503 │ │ │ data = json.loads(response.content) │
| │ 504 │ │ │ self.assertNotIn('errors', data) │
| │ 505 │
| │ │
| │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
| │ │ field_name = 'module' │ │
| │ │ obj_perm = <ObjectPermission: Test permission> │ │
| │ │ object_id = 1 │ │
| │ │ query = '\n {\n module(id:1) {\n │ │
| │ │ id\ncreated\nlas'+409 │ │
| │ │ response = <HttpResponse status_code=400, "application/json"> │ │
| │ │ self = <dcim.tests.test_api.ModuleTest │ │
| │ │ testMethod=test_graphql_get_object> │ │
| │ │ url = '/graphql/' │ │
| │ ╰──────────────────────────────────────────────────────────────────────────╯ │
| │ │
| │ /opt/netbox/netbox/utilities/testing/base.py:71 in assertHttpStatus │
| │ │
| │ 68 │ │ │ │ form_errors = extract_form_failures(response.content) │
| │ 69 │ │ │ │ err = form_errors or response.content or 'No data' │
| │ 70 │ │ │ err_message = f"Expected HTTP status {expected_status}; re │
| │ ❱ 71 │ │ self.assertEqual(response.status_code, expected_status, err_me │
| │ 72 │
| │ 73 │
| │ 74 class ModelTestCase(TestCase): │
| │ │
| │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
| │ │ err = b'{"errors":[{"message":"Cannot query field │ │
| │ │ \'assigned_asset\' on type \'ModuleType\'.'+42 │ │
| │ │ err_message = 'Expected HTTP status 200; received 400: │ │
| │ │ b\'{"errors":[{"message":"Cannot query fi'+89 │ │
| │ │ expected_status = 200 │ │
| │ │ form_errors = [] │ │
| │ │ response = <HttpResponse status_code=400, "application/json"> │ │
| │ │ self = <dcim.tests.test_api.ModuleTest │ │
| │ │ testMethod=test_graphql_get_object> │ │
| │ ╰──────────────────────────────────────────────────────────────────────────╯ │
| │ │
| │ /usr/lib/python3.11/unittest/case.py:873 in assertEqual │
| │ │
| │ /usr/lib/python3.11/unittest/case.py:866 in _baseAssertEqual │
| ╰──────────────────────────────────────────────────────────────────────────────╯
| AssertionError: 400 != 200 : Expected HTTP status 200; received 400:
| b'{"errors":[{"message":"Cannot query field \'assigned_asset\' on type
| \'ModuleType\'.","locations":[{"line":24,"column":17}]}]}'
|
| ────────────────────────────────────────────────────────────────────────────────
| FAIL: test_graphql_list_objects
| (dcim.tests.test_api.ModuleTest.test_graphql_list_objects)
| ────────────────────────────────────────────────────────────────────────────────
| ╭───────────────────── Traceback (most recent call last) ──────────────────────╮
| │ /opt/netbox/venv/lib/python3.11/site-packages/django/test/utils.py:460 in │
| │ inner │
| │ │
| │ /opt/netbox/venv/lib/python3.11/site-packages/django/test/utils.py:460 in │
| │ inner │
| │ │
| │ /opt/netbox/netbox/utilities/testing/api.py:527 in test_graphql_list_objects │
| │ │
| │ 524 │ │ │ obj_perm.object_types.add(ContentType.objects.get_for_mode │
| │ 525 │ │ │ │
| │ 526 │ │ │ response = self.client.post(url, data={'query': query}, ** │
| │ ❱ 527 │ │ │ self.assertHttpStatus(response, status.HTTP_200_OK) │
| │ 528 │ │ │ data = json.loads(response.content) │
| │ 529 │ │ │ self.assertNotIn('errors', data) │
| │ 530 │ │ │ self.assertGreater(len(data['data'][field_name]), 0) │
| │ │
| │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
| │ │ field_name = 'module_list' │ │
| │ │ obj_perm = <ObjectPermission: Test permission> │ │
| │ │ query = '\n {\n module_list {\n │ │
| │ │ id\ncreated\nlast'+408 │ │
| │ │ response = <HttpResponse status_code=400, "application/json"> │ │
| │ │ self = <dcim.tests.test_api.ModuleTest │ │
| │ │ testMethod=test_graphql_list_objects> │ │
| │ │ url = '/graphql/' │ │
| │ ╰──────────────────────────────────────────────────────────────────────────╯ │
| │ │
| │ /opt/netbox/netbox/utilities/testing/base.py:71 in assertHttpStatus │
| │ │
| │ 68 │ │ │ │ form_errors = extract_form_failures(response.content) │
| │ 69 │ │ │ │ err = form_errors or response.content or 'No data' │
| │ 70 │ │ │ err_message = f"Expected HTTP status {expected_status}; re │
| │ ❱ 71 │ │ self.assertEqual(response.status_code, expected_status, err_me │
| │ 72 │
| │ 73 │
| │ 74 class ModelTestCase(TestCase): │
| │ │
| │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
| │ │ err = b'{"errors":[{"message":"Cannot query field │ │
| │ │ \'assigned_asset\' on type \'ModuleType\'.'+42 │ │
| │ │ err_message = 'Expected HTTP status 200; received 400: │ │
| │ │ b\'{"errors":[{"message":"Cannot query fi'+89 │ │
| │ │ expected_status = 200 │ │
| │ │ form_errors = [] │ │
| │ │ response = <HttpResponse status_code=400, "application/json"> │ │
| │ │ self = <dcim.tests.test_api.ModuleTest │ │
| │ │ testMethod=test_graphql_list_objects> │ │
| │ ╰──────────────────────────────────────────────────────────────────────────╯ │
| │ │
| │ /usr/lib/python3.11/unittest/case.py:873 in assertEqual │
| │ │
| │ /usr/lib/python3.11/unittest/case.py:866 in _baseAssertEqual │
| ╰──────────────────────────────────────────────────────────────────────────────╯
| AssertionError: 400 != 200 : Expected HTTP status 200; received 400:
| b'{"errors":[{"message":"Cannot query field \'assigned_asset\' on type
| \'ModuleType\'.","locations":[{"line":24,"column":17}]}]}'
|
| ----------------------------------------------------------------------
| Ran 5797 tests in 318.595s
|
| FAILED (failures=8, skipped=18)
| Destroying test database for alias 'default'...
| + test_cleanup
| + echo '💣 Cleaning Up'
| 💣 Cleaning Up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment