Mock Version: 5.0 Mock Version: 5.0 Mock Version: 5.0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target noarch --nodeps /builddir/build/SPECS/ansible-collection-netbox-netbox.spec'], chrootPath='/var/lib/mock/f39-build-1779684-41541/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=864000uid=996gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target noarch --nodeps /builddir/build/SPECS/ansible-collection-netbox-netbox.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1689724800 Wrote: /builddir/build/SRPMS/ansible-collection-netbox-netbox-3.9.0-3.fc39.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --noclean --target noarch --nodeps /builddir/build/SPECS/ansible-collection-netbox-netbox.spec'], chrootPath='/var/lib/mock/f39-build-1779684-41541/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=864000uid=996gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --noclean --target noarch --nodeps /builddir/build/SPECS/ansible-collection-netbox-netbox.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1689724800 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.wMcfwx + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf ansible_modules-3.9.0 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/ansible-collection-netbox-netbox-3.9.0.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd ansible_modules-3.9.0 + rm -rf /builddir/build/BUILD/ansible_modules-3.9.0-SPECPARTS + /usr/bin/mkdir -p /builddir/build/BUILD/ansible_modules-3.9.0-SPECPARTS + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + /usr/lib/rpm/rpmuncompress /builddir/build/SOURCES/build_ignore.patch + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f + sed -i -e '1{\@^#!.*@d}' plugins/modules/__init__.py plugins/modules/netbox_aggregate.py plugins/modules/netbox_cable.py plugins/modules/netbox_circuit.py plugins/modules/netbox_circuit_termination.py plugins/modules/netbox_circuit_type.py plugins/modules/netbox_cluster.py plugins/modules/netbox_cluster_group.py plugins/modules/netbox_cluster_type.py plugins/modules/netbox_config_context.py plugins/modules/netbox_console_port.py plugins/modules/netbox_console_port_template.py plugins/modules/netbox_console_server_port.py plugins/modules/netbox_console_server_port_template.py plugins/modules/netbox_contact.py plugins/modules/netbox_contact_group.py plugins/modules/netbox_contact_role.py plugins/modules/netbox_custom_field.py plugins/modules/netbox_custom_link.py plugins/modules/netbox_device.py plugins/modules/netbox_device_bay.py plugins/modules/netbox_device_bay_template.py plugins/modules/netbox_device_interface.py plugins/modules/netbox_device_interface_template.py plugins/modules/netbox_device_role.py plugins/modules/netbox_device_type.py plugins/modules/netbox_export_template.py plugins/modules/netbox_front_port.py plugins/modules/netbox_front_port_template.py plugins/modules/netbox_inventory_item.py plugins/modules/netbox_ip_address.py plugins/modules/netbox_ipam_role.py plugins/modules/netbox_l2vpn.py plugins/modules/netbox_location.py plugins/modules/netbox_manufacturer.py plugins/modules/netbox_platform.py plugins/modules/netbox_power_feed.py plugins/modules/netbox_power_outlet.py plugins/modules/netbox_power_outlet_template.py plugins/modules/netbox_power_panel.py plugins/modules/netbox_power_port.py plugins/modules/netbox_power_port_template.py plugins/modules/netbox_prefix.py plugins/modules/netbox_provider.py plugins/modules/netbox_provider_network.py plugins/modules/netbox_rack.py plugins/modules/netbox_rack_group.py plugins/modules/netbox_rack_role.py plugins/modules/netbox_rear_port.py plugins/modules/netbox_rear_port_template.py plugins/modules/netbox_region.py plugins/modules/netbox_rir.py plugins/modules/netbox_route_target.py plugins/modules/netbox_service.py plugins/modules/netbox_site.py plugins/modules/netbox_site_group.py plugins/modules/netbox_tag.py plugins/modules/netbox_tenant.py plugins/modules/netbox_tenant_group.py plugins/modules/netbox_virtual_chassis.py plugins/modules/netbox_virtual_machine.py plugins/modules/netbox_vlan.py plugins/modules/netbox_vlan_group.py plugins/modules/netbox_vm_interface.py plugins/modules/netbox_vrf.py plugins/modules/netbox_webhook.py plugins/modules/netbox_wireless_lan.py plugins/modules/netbox_wireless_lan_group.py plugins/modules/netbox_wireless_link.py + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.Lf09zl + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd ansible_modules-3.9.0 + ansible-galaxy collection build Created collection for netbox.netbox at /builddir/build/BUILD/ansible_modules-3.9.0/netbox-netbox-3.9.0.tar.gz + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.q5guLT + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/ansible-collection-netbox-netbox-3.9.0-3.fc39.noarch '!=' / ']' + rm -rf /builddir/build/BUILDROOT/ansible-collection-netbox-netbox-3.9.0-3.fc39.noarch ++ dirname /builddir/build/BUILDROOT/ansible-collection-netbox-netbox-3.9.0-3.fc39.noarch + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/ansible-collection-netbox-netbox-3.9.0-3.fc39.noarch + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd ansible_modules-3.9.0 + /usr/lib/rpm/ansible_collection.py install --collections-dir /builddir/build/BUILDROOT/ansible-collection-netbox-netbox-3.9.0-3.fc39.noarch/usr/share/ansible/collections/ansible_collections --filelist /builddir/build/BUILD/ansible_modules-3.9.0/.ansible-packaging/ansible_collection_files Loading collection metadata from /builddir/build/BUILD/ansible_modules-3.9.0/galaxy.yml Running: ('ansible-galaxy', 'collection', 'install', '-n', '-p', '/builddir/build/BUILDROOT/ansible-collection-netbox-netbox-3.9.0-3.fc39.noarch/usr/share/ansible/collections/ansible_collections', '/builddir/build/BUILD/ansible_modules-3.9.0/netbox-netbox-3.9.0.tar.gz') [WARNING]: The specified collections path '/builddir/build/BUILDROOT/ansible- collection-netbox- netbox-3.9.0-3.fc39.noarch/usr/share/ansible/collections/ansible_collections' is not part of the configured Ansible collections paths '/builddir/.ansible/collections:/usr/share/ansible/collections'. The installed collection will not be picked up in an Ansible run, unless within a playbook- adjacent collections directory. Starting galaxy collection install process Process install dependency map Starting collection install process Installing 'netbox.netbox:3.9.0' to '/builddir/build/BUILDROOT/ansible-collection-netbox-netbox-3.9.0-3.fc39.noarch/usr/share/ansible/collections/ansible_collections/netbox/netbox' netbox.netbox:3.9.0 was installed successfully Writing filelist to /builddir/build/BUILD/ansible_modules-3.9.0/.ansible-packaging/ansible_collection_files + /usr/bin/find-debuginfo -j8 --strict-build-id -m -i --build-id-seed 3.9.0-3.fc39 --unique-debug-suffix -3.9.0-3.fc39.noarch --unique-debug-src-base ansible-collection-netbox-netbox-3.9.0-3.fc39.noarch --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -S debugsourcefiles.list /builddir/build/BUILD/ansible_modules-3.9.0 find-debuginfo: starting Extracting debug info from 0 files Creating .debug symlinks for symlinks to ELF files find-debuginfo: done + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/redhat/brp-strip-lto /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/check-rpaths + /usr/lib/rpm/redhat/brp-mangle-shebangs + /usr/lib/rpm/brp-remove-la-files + env /usr/lib/rpm/redhat/brp-python-bytecompile '' 1 0 -j8 + /usr/lib/rpm/redhat/brp-python-hardlink Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.NqybDT + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd ansible_modules-3.9.0 + /usr/lib/rpm/ansible_collection.py test -- --python-interpreter /usr/bin/python3 --local Loading collection metadata from /builddir/build/BUILD/ansible_modules-3.9.0/galaxy.yml Running: ('ansible-test', 'units', '--python-interpreter', '/usr/bin/python3', '--local') WARNING: Using locale "C.UTF-8" instead of "en_US.UTF-8". Tests which depend on the locale may behave unexpectedly. Unit test controller with Python 3.12 ============================= test session starts ============================== platform linux -- Python 3.12.0, pytest-7.3.2, pluggy-1.2.0 rootdir: /tmp/tmpmi_b52ma/ansible_collections/netbox/netbox configfile: ../../../../../usr/lib/python3.12/site-packages/ansible_test/_data/pytest/config/default.ini plugins: mock-3.11.1, xdist-3.3.1 created: 8/8 workers 8 workers [204 items] ........................................................................ [ 35%] ........................................................................ [ 70%] ..............................................FF.F.F.F.F.F.. [100%] =================================== FAILURES =================================== __________________ test_delete_netbox_object_check_mode_true ___________________ [gw1] linux -- Python 3.12.0 /usr/bin/python3 mock_netbox_module = nb_obj_mock = on_deletion_diff = {'after': {'state': 'absent'}, 'before': {'state': 'present'}} def test_delete_netbox_object_check_mode_true( mock_netbox_module, nb_obj_mock, on_deletion_diff ): mock_netbox_module.check_mode = True mock_netbox_module.nb_object = nb_obj_mock diff = mock_netbox_module._delete_netbox_object() > assert nb_obj_mock.delete.not_called() tests/unit/module_utils/test_netbox_base_class.py:311: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = 'not_called' def __getattr__(self, name): if name in {'_mock_methods', '_mock_unsafe'}: raise AttributeError(name) elif self._mock_methods is not None: if name not in self._mock_methods or name in _all_magics: raise AttributeError("Mock object has no attribute %r" % name) elif _is_magic(name): raise AttributeError(name) if not self._mock_unsafe and (not self._mock_methods or name not in self._mock_methods): if name.startswith(('assert', 'assret', 'asert', 'aseert', 'assrt')) or name in _ATTRIB_DENY_LIST: > raise AttributeError( f"{name!r} is not a valid assertion. Use a spec " f"for the mock if {name!r} is meant to be an attribute.") E AttributeError: 'not_called' is not a valid assertion. Use a spec for the mock if 'not_called' is meant to be an attribute. /usr/lib64/python3.12/unittest/mock.py:663: AttributeError __________________ test_create_netbox_object_check_mode_true ___________________ [gw4] linux -- Python 3.12.0 /usr/bin/python3 mock_netbox_module = endpoint_mock = normalized_data = {'asset_tag': '1001', 'device_role': 'core-switch', 'device_type': 'cisco-switch', 'manufacturer': 'cisco', ...} on_creation_diff = {'after': {'state': 'present'}, 'before': {'state': 'absent'}} def test_create_netbox_object_check_mode_true( mock_netbox_module, endpoint_mock, normalized_data, on_creation_diff ): mock_netbox_module.check_mode = True serialized_obj, diff = mock_netbox_module._create_netbox_object( endpoint_mock, normalized_data ) > assert endpoint_mock.create.not_called() tests/unit/module_utils/test_netbox_base_class.py:291: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = 'not_called' def __getattr__(self, name): if name in {'_mock_methods', '_mock_unsafe'}: raise AttributeError(name) elif self._mock_methods is not None: if name not in self._mock_methods or name in _all_magics: raise AttributeError("Mock object has no attribute %r" % name) elif _is_magic(name): raise AttributeError(name) if not self._mock_unsafe and (not self._mock_methods or name not in self._mock_methods): if name.startswith(('assert', 'assret', 'asert', 'aseert', 'assrt')) or name in _ATTRIB_DENY_LIST: > raise AttributeError( f"{name!r} is not a valid assertion. Use a spec " f"for the mock if {name!r} is meant to be an attribute.") E AttributeError: 'not_called' is not a valid assertion. Use a spec for the mock if 'not_called' is meant to be an attribute. /usr/lib64/python3.12/unittest/mock.py:663: AttributeError __________________ test_delete_netbox_object_check_mode_false __________________ [gw6] linux -- Python 3.12.0 /usr/bin/python3 mock_netbox_module = nb_obj_mock = on_deletion_diff = {'after': {'state': 'absent'}, 'before': {'state': 'present'}} def test_delete_netbox_object_check_mode_false( mock_netbox_module, nb_obj_mock, on_deletion_diff ): mock_netbox_module.nb_object = nb_obj_mock diff = mock_netbox_module._delete_netbox_object() > assert nb_obj_mock.delete.called_once() tests/unit/module_utils/test_netbox_base_class.py:301: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = 'called_once' def __getattr__(self, name): if name in {'_mock_methods', '_mock_unsafe'}: raise AttributeError(name) elif self._mock_methods is not None: if name not in self._mock_methods or name in _all_magics: raise AttributeError("Mock object has no attribute %r" % name) elif _is_magic(name): raise AttributeError(name) if not self._mock_unsafe and (not self._mock_methods or name not in self._mock_methods): if name.startswith(('assert', 'assret', 'asert', 'aseert', 'assrt')) or name in _ATTRIB_DENY_LIST: > raise AttributeError( f"{name!r} is not a valid assertion. Use a spec " f"for the mock if {name!r} is meant to be an attribute.") E AttributeError: 'called_once' is not a valid assertion. Use a spec for the mock if 'called_once' is meant to be an attribute. /usr/lib64/python3.12/unittest/mock.py:663: AttributeError __________________ test_create_netbox_object_check_mode_false __________________ [gw2] linux -- Python 3.12.0 /usr/bin/python3 mock_netbox_module = endpoint_mock = normalized_data = {'asset_tag': '1001', 'device_role': 'core-switch', 'device_type': 'cisco-switch', 'manufacturer': 'cisco', ...} on_creation_diff = {'after': {'state': 'present'}, 'before': {'state': 'absent'}} def test_create_netbox_object_check_mode_false( mock_netbox_module, endpoint_mock, normalized_data, on_creation_diff ): return_value = endpoint_mock.create().serialize() serialized_obj, diff = mock_netbox_module._create_netbox_object( endpoint_mock, normalized_data ) > assert endpoint_mock.create.called_once_with(normalized_data) tests/unit/module_utils/test_netbox_base_class.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = 'called_once_with' def __getattr__(self, name): if name in {'_mock_methods', '_mock_unsafe'}: raise AttributeError(name) elif self._mock_methods is not None: if name not in self._mock_methods or name in _all_magics: raise AttributeError("Mock object has no attribute %r" % name) elif _is_magic(name): raise AttributeError(name) if not self._mock_unsafe and (not self._mock_methods or name not in self._mock_methods): if name.startswith(('assert', 'assret', 'asert', 'aseert', 'assrt')) or name in _ATTRIB_DENY_LIST: > raise AttributeError( f"{name!r} is not a valid assertion. Use a spec " f"for the mock if {name!r} is meant to be an attribute.") E AttributeError: 'called_once_with' is not a valid assertion. Use a spec for the mock if 'called_once_with' is meant to be an attribute.. Did you mean: 'assert_called_once_with'? /usr/lib64/python3.12/unittest/mock.py:663: AttributeError ____________ test_update_netbox_object_with_changes_check_mode_true ____________ [gw7] linux -- Python 3.12.0 /usr/bin/python3 mock_netbox_module = nb_obj_mock = changed_serialized_obj = {'asset_tag': '1001', 'device_role': 'core-switch', 'device_type': 'cisco-switch', 'manufacturer': 'cisco', ...} on_update_diff = {'after': {'name': 'Test Device1 (modified)'}, 'before': {'name': 'Test Device1'}} def test_update_netbox_object_with_changes_check_mode_true( mock_netbox_module, nb_obj_mock, changed_serialized_obj, on_update_diff ): mock_netbox_module.nb_object = nb_obj_mock mock_netbox_module.check_mode = True updated_serialized_obj = nb_obj_mock.serialize().copy() updated_serialized_obj.update(changed_serialized_obj) serialized_obj, diff = mock_netbox_module._update_netbox_object( changed_serialized_obj ) > assert nb_obj_mock.update.not_called() tests/unit/module_utils/test_netbox_base_class.py:347: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = 'not_called' def __getattr__(self, name): if name in {'_mock_methods', '_mock_unsafe'}: raise AttributeError(name) elif self._mock_methods is not None: if name not in self._mock_methods or name in _all_magics: raise AttributeError("Mock object has no attribute %r" % name) elif _is_magic(name): raise AttributeError(name) if not self._mock_unsafe and (not self._mock_methods or name not in self._mock_methods): if name.startswith(('assert', 'assret', 'asert', 'aseert', 'assrt')) or name in _ATTRIB_DENY_LIST: > raise AttributeError( f"{name!r} is not a valid assertion. Use a spec " f"for the mock if {name!r} is meant to be an attribute.") E AttributeError: 'not_called' is not a valid assertion. Use a spec for the mock if 'not_called' is meant to be an attribute. /usr/lib64/python3.12/unittest/mock.py:663: AttributeError _____________________ test_update_netbox_object_no_changes _____________________ [gw5] linux -- Python 3.12.0 /usr/bin/python3 mock_netbox_module = nb_obj_mock = def test_update_netbox_object_no_changes(mock_netbox_module, nb_obj_mock): mock_netbox_module.nb_object = nb_obj_mock unchanged_data = nb_obj_mock.serialize() serialized_object, diff = mock_netbox_module._update_netbox_object(unchanged_data) > assert nb_obj_mock.update.not_called() tests/unit/module_utils/test_netbox_base_class.py:319: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = 'not_called' def __getattr__(self, name): if name in {'_mock_methods', '_mock_unsafe'}: raise AttributeError(name) elif self._mock_methods is not None: if name not in self._mock_methods or name in _all_magics: raise AttributeError("Mock object has no attribute %r" % name) elif _is_magic(name): raise AttributeError(name) if not self._mock_unsafe and (not self._mock_methods or name not in self._mock_methods): if name.startswith(('assert', 'assret', 'asert', 'aseert', 'assrt')) or name in _ATTRIB_DENY_LIST: > raise AttributeError( f"{name!r} is not a valid assertion. Use a spec " f"for the mock if {name!r} is meant to be an attribute.") E AttributeError: 'not_called' is not a valid assertion. Use a spec for the mock if 'not_called' is meant to be an attribute. /usr/lib64/python3.12/unittest/mock.py:663: AttributeError ___________ test_update_netbox_object_with_changes_check_mode_false ____________ [gw0] linux -- Python 3.12.0 /usr/bin/python3 mock_netbox_module = nb_obj_mock = changed_serialized_obj = {'asset_tag': '1001', 'device_role': 'core-switch', 'device_type': 'cisco-switch', 'manufacturer': 'cisco', ...} on_update_diff = {'after': {'name': 'Test Device1 (modified)'}, 'before': {'name': 'Test Device1'}} def test_update_netbox_object_with_changes_check_mode_false( mock_netbox_module, nb_obj_mock, changed_serialized_obj, on_update_diff ): mock_netbox_module.nb_object = nb_obj_mock serialized_obj, diff = mock_netbox_module._update_netbox_object( changed_serialized_obj ) > assert nb_obj_mock.update.called_once_with(changed_serialized_obj) tests/unit/module_utils/test_netbox_base_class.py:331: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = name = 'called_once_with' def __getattr__(self, name): if name in {'_mock_methods', '_mock_unsafe'}: raise AttributeError(name) elif self._mock_methods is not None: if name not in self._mock_methods or name in _all_magics: raise AttributeError("Mock object has no attribute %r" % name) elif _is_magic(name): raise AttributeError(name) if not self._mock_unsafe and (not self._mock_methods or name not in self._mock_methods): if name.startswith(('assert', 'assret', 'asert', 'aseert', 'assrt')) or name in _ATTRIB_DENY_LIST: > raise AttributeError( f"{name!r} is not a valid assertion. Use a spec " f"for the mock if {name!r} is meant to be an attribute.") E AttributeError: 'called_once_with' is not a valid assertion. Use a spec for the mock if 'called_once_with' is meant to be an attribute.. Did you mean: 'assert_called_once_with'? /usr/lib64/python3.12/unittest/mock.py:663: AttributeError =============================== warnings summary =============================== tests/unit/inventory/test_nb_inventory.py::test_refresh_lookups /usr/lib/python3.12/site-packages/_pytest/threadexception.py:73: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-2 (wrapper) Traceback (most recent call last): File "/usr/lib64/python3.12/threading.py", line 1052, in _bootstrap_inner self.run() File "/usr/lib64/python3.12/threading.py", line 989, in run self._target(*self._args, **self._kwargs) File "/tmp/tmpmi_b52ma/ansible_collections/netbox/netbox/plugins/inventory/nb_inventory.py", line 1445, in wrapper raise e File "/tmp/tmpmi_b52ma/ansible_collections/netbox/netbox/plugins/inventory/nb_inventory.py", line 1440, in wrapper lookup() File "/tmp/tmpmi_b52ma/ansible_collections/netbox/netbox/tests/unit/inventory/test_nb_inventory.py", line 133, in raises_exception raise Exception("Error from within a thread") Exception: Error from within a thread warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html - generated xml file: /tmp/tmpmi_b52ma/ansible_collections/netbox/netbox/tests/output/junit/python3.12-controller-units.xml - =========================== short test summary info ============================ FAILED tests/unit/module_utils/test_netbox_base_class.py::test_delete_netbox_object_check_mode_true FAILED tests/unit/module_utils/test_netbox_base_class.py::test_create_netbox_object_check_mode_true FAILED tests/unit/module_utils/test_netbox_base_class.py::test_delete_netbox_object_check_mode_false FAILED tests/unit/module_utils/test_netbox_base_class.py::test_create_netbox_object_check_mode_false FAILED tests/unit/module_utils/test_netbox_base_class.py::test_update_netbox_object_with_changes_check_mode_true FAILED tests/unit/module_utils/test_netbox_base_class.py::test_update_netbox_object_no_changes FAILED tests/unit/module_utils/test_netbox_base_class.py::test_update_netbox_object_with_changes_check_mode_false ============= 7 failed, 197 passed, 1 warning in 71.53s (0:01:11) ============== FATAL: Command "pytest -r a -n auto --color no -p no:cacheprovider -c /usr/lib/python3.12/site-packages/ansible_test/_data/pytest/config/default.ini --junit-xml /tmp/tmpmi_b52ma/ansible_collections/netbox/netbox/tests/output/junit/python3.12-controller-units.xml --strict-markers --rootdir /tmp/tmpmi_b52ma/ansible_collections/netbox/netbox tests/unit/inventory/test_nb_inventory.py tests/unit/module_utils/test_netbox_base_class.py" returned exit status 1. Command '('ansible-test', 'units', '--python-interpreter', '/usr/bin/python3', '--local')' returned non-zero exit status 1. error: Bad exit status from /var/tmp/rpm-tmp.NqybDT (%check) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.NqybDT (%check) Child return code was: 1 EXCEPTION: [Error('Command failed: \n # bash --login -c /usr/bin/rpmbuild -bb --noclean --target noarch --nodeps /builddir/build/SPECS/ansible-collection-netbox-netbox.spec\n', 1)] Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) ^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/mockbuild/util.py", line 597, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode) mockbuild.exception.Error: Command failed: # bash --login -c /usr/bin/rpmbuild -bb --noclean --target noarch --nodeps /builddir/build/SPECS/ansible-collection-netbox-netbox.spec