sbuild (Debian sbuild) 0.86.3~bpo12+1 (03 November 2024) on debusine-worker-arm64-demeter-01.freexian.com
+==============================================================================+
| python-aiowithings 3.0.3-2 (arm64) Mon, 18 Nov 2024 00:32:38 +0000 |
+==============================================================================+
Package: python-aiowithings
Version: 3.0.3-2
Source Version: 3.0.3-2
Distribution: sid
Machine Architecture: arm64
Host Architecture: arm64
Build Architecture: arm64
Build Type: binary
I: No tarballs found in /var/lib/debusine/worker/.cache/sbuild
Unpacking /var/lib/debusine/worker/system-images/957781/system.tar.xz to /tmp/tmp.sbuild.mxAE8Jzz9F...
I: NOTICE: Log filtering will replace 'sbuild-unshare-dummy-location' with '<<CHROOT>>'
+------------------------------------------------------------------------------+
| Chroot Setup Commands |
+------------------------------------------------------------------------------+
rm -f /etc/resolv.conf
----------------------
I: Finished running 'rm -f /etc/resolv.conf'.
Finished processing commands.
--------------------------------------------------------------------------------
Copying /tmp/debusine-fetch-exec-upload-34zb_fyw/dpkg-dbgsym_1.22.12~1.gbp82cafd_arm64.deb to /<<CHROOT>>...
Copying /tmp/debusine-fetch-exec-upload-34zb_fyw/dpkg_1.22.12~1.gbp82cafd_arm64.deb to /<<CHROOT>>...
Copying /tmp/debusine-fetch-exec-upload-34zb_fyw/dselect-dbgsym_1.22.12~1.gbp82cafd_arm64.deb to /<<CHROOT>>...
Copying /tmp/debusine-fetch-exec-upload-34zb_fyw/dselect_1.22.12~1.gbp82cafd_arm64.deb to /<<CHROOT>>...
Copying /tmp/debusine-fetch-exec-upload-34zb_fyw/libdpkg-dev_1.22.12~1.gbp82cafd_arm64.deb to /<<CHROOT>>...
Copying /tmp/debusine-fetch-exec-upload-34zb_fyw/dpkg-dev_1.22.12~1.gbp82cafd_all.deb to /<<CHROOT>>...
Copying /tmp/debusine-fetch-exec-upload-34zb_fyw/libdpkg-perl_1.22.12~1.gbp82cafd_all.deb to /<<CHROOT>>...
I: NOTICE: Log filtering will replace 'build/python-aiowithings-P1XYKc/resolver-Dn9OGz' with '<<RESOLVERDIR>>'
+------------------------------------------------------------------------------+
| Update chroot |
+------------------------------------------------------------------------------+
Get:1 file:/build/python-aiowithings-P1XYKc/resolver-F6oucn/apt_archive ./ InRelease
Ign:1 file:/build/python-aiowithings-P1XYKc/resolver-F6oucn/apt_archive ./ InRelease
Get:2 file:/build/python-aiowithings-P1XYKc/resolver-F6oucn/apt_archive ./ Release [606 B]
Get:3 http://deb.debian.org/debian sid InRelease [202 kB]
Get:2 file:/build/python-aiowithings-P1XYKc/resolver-F6oucn/apt_archive ./ Release [606 B]
Get:4 file:/build/python-aiowithings-P1XYKc/resolver-F6oucn/apt_archive ./ Release.gpg
Ign:4 file:/build/python-aiowithings-P1XYKc/resolver-F6oucn/apt_archive ./ Release.gpg
Get:5 file:/build/python-aiowithings-P1XYKc/resolver-F6oucn/apt_archive ./ Packages [9246 B]
Get:6 http://deb.debian.org/debian sid/main arm64 Packages [9955 kB]
Get:7 http://deb.debian.org/debian sid/main arm64 Components [4907 kB]
Fetched 15.1 MB in 2s (6329 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
The following packages will be upgraded:
apt bsdextrautils bsdutils debianutils dpkg dpkg-dev libapt-pkg6.0t64
libaudit-common libaudit1 libblkid1 libbrotli1 libcap-ng0 libdpkg-perl
libglib2.0-0t64 libmarkdown2 libmount1 libpcre2-8-0 libseccomp2 libselinux1
libsemanage2 libsmartcols1 libsystemd0 libudev1 libuuid1 libxml2 login
login.defs mount passwd util-linux
30 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 9274 kB/12.8 MB of archives.
After this operation, 603 kB disk space will be freed.
Get:1 http://deb.debian.org/debian sid/main arm64 bsdutils arm64 1:2.40.2-11 [104 kB]
Get:2 file:/build/python-aiowithings-P1XYKc/resolver-F6oucn/apt_archive ./ dpkg 1.22.12~1.gbp82cafd [1513 kB]
Get:3 file:/build/python-aiowithings-P1XYKc/resolver-F6oucn/apt_archive ./ dpkg-dev 1.22.12~1.gbp82cafd [1337 kB]
Get:4 http://deb.debian.org/debian sid/main arm64 debianutils arm64 5.21 [92.1 kB]
Get:5 http://deb.debian.org/debian sid/main arm64 libsystemd0 arm64 257~rc2-3 [416 kB]
Get:6 file:/build/python-aiowithings-P1XYKc/resolver-F6oucn/apt_archive ./ libdpkg-perl 1.22.12~1.gbp82cafd [647 kB]
Get:7 http://deb.debian.org/debian sid/main arm64 libudev1 arm64 257~rc2-3 [139 kB]
Get:8 http://deb.debian.org/debian sid/main arm64 libapt-pkg6.0t64 arm64 2.9.11 [921 kB]
Get:9 http://deb.debian.org/debian sid/main arm64 bsdextrautils arm64 2.40.2-11 [91.2 kB]
Get:10 http://deb.debian.org/debian sid/main arm64 libblkid1 arm64 2.40.2-11 [162 kB]
Get:11 http://deb.debian.org/debian sid/main arm64 libmount1 arm64 2.40.2-11 [190 kB]
Get:12 http://deb.debian.org/debian sid/main arm64 libsmartcols1 arm64 2.40.2-11 [135 kB]
Get:13 http://deb.debian.org/debian sid/main arm64 mount arm64 2.40.2-11 [153 kB]
Get:14 http://deb.debian.org/debian sid/main arm64 libuuid1 arm64 2.40.2-11 [35.7 kB]
Get:15 http://deb.debian.org/debian sid/main arm64 util-linux arm64 2.40.2-11 [1170 kB]
Get:16 http://deb.debian.org/debian sid/main arm64 libpcre2-8-0 arm64 10.44-4 [243 kB]
Get:17 http://deb.debian.org/debian sid/main arm64 libselinux1 arm64 3.7-3+b1 [72.1 kB]
Get:18 http://deb.debian.org/debian sid/main arm64 libseccomp2 arm64 2.5.5-1+b3 [46.8 kB]
Get:19 http://deb.debian.org/debian sid/main arm64 apt arm64 2.9.11 [1287 kB]
Get:20 http://deb.debian.org/debian sid/main arm64 libaudit-common all 1:4.0.2-2 [12.7 kB]
Get:21 http://deb.debian.org/debian sid/main arm64 libcap-ng0 arm64 0.8.5-3+b1 [17.0 kB]
Get:22 http://deb.debian.org/debian sid/main arm64 libaudit1 arm64 1:4.0.2-2 [54.2 kB]
Get:23 http://deb.debian.org/debian sid/main arm64 login arm64 1:4.16.0-2+really2.40.2-11 [80.0 kB]
Get:24 http://deb.debian.org/debian sid/main arm64 login.defs all 1:4.16.0-5 [185 kB]
Get:25 http://deb.debian.org/debian sid/main arm64 libsemanage2 arm64 3.7-2+b1 [84.5 kB]
Get:26 http://deb.debian.org/debian sid/main arm64 passwd arm64 1:4.16.0-5 [1210 kB]
Get:27 http://deb.debian.org/debian sid/main arm64 libbrotli1 arm64 1.1.0-2+b6 [297 kB]
Get:28 http://deb.debian.org/debian sid/main arm64 libglib2.0-0t64 arm64 2.82.2-3 [1411 kB]
Get:29 http://deb.debian.org/debian sid/main arm64 libmarkdown2 arm64 2.2.7-2.1 [33.1 kB]
Get:30 http://deb.debian.org/debian sid/main arm64 libxml2 arm64 2.12.7+dfsg+really2.9.14-0.2+b1 [630 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 9274 kB in 0s (61.1 MB/s)
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 17129 files and directories currently installed.)
Preparing to unpack .../bsdutils_1%3a2.40.2-11_arm64.deb ...
Unpacking bsdutils (1:2.40.2-11) over (1:2.40.2-10) ...
Setting up bsdutils (1:2.40.2-11) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 17129 files and directories currently installed.)
Preparing to unpack .../debianutils_5.21_arm64.deb ...
Unpacking debianutils (5.21) over (5.20+b1) ...
Setting up debianutils (5.21) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 17128 files and directories currently installed.)
Preparing to unpack .../libsystemd0_257~rc2-3_arm64.deb ...
Unpacking libsystemd0:arm64 (257~rc2-3) over (257~rc1-4) ...
Setting up libsystemd0:arm64 (257~rc2-3) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 17128 files and directories currently installed.)
Preparing to unpack .../libudev1_257~rc2-3_arm64.deb ...
Unpacking libudev1:arm64 (257~rc2-3) over (257~rc1-4) ...
Setting up libudev1:arm64 (257~rc2-3) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 17128 files and directories currently installed.)
Preparing to unpack .../libapt-pkg6.0t64_2.9.11_arm64.deb ...
Unpacking libapt-pkg6.0t64:arm64 (2.9.11) over (2.9.10) ...
Setting up libapt-pkg6.0t64:arm64 (2.9.11) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 17128 files and directories currently installed.)
Preparing to unpack .../dpkg_1.22.12~1.gbp82cafd_arm64.deb ...
Unpacking dpkg (1.22.12~1.gbp82cafd) over (1.22.11) ...
Setting up dpkg (1.22.12~1.gbp82cafd) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 17127 files and directories currently installed.)
Preparing to unpack .../bsdextrautils_2.40.2-11_arm64.deb ...
Unpacking bsdextrautils (2.40.2-11) over (2.40.2-10) ...
Preparing to unpack .../libblkid1_2.40.2-11_arm64.deb ...
Unpacking libblkid1:arm64 (2.40.2-11) over (2.40.2-10) ...
Setting up libblkid1:arm64 (2.40.2-11) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 17123 files and directories currently installed.)
Preparing to unpack .../libmount1_2.40.2-11_arm64.deb ...
Unpacking libmount1:arm64 (2.40.2-11) over (2.40.2-10) ...
Setting up libmount1:arm64 (2.40.2-11) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 17123 files and directories currently installed.)
Preparing to unpack .../libsmartcols1_2.40.2-11_arm64.deb ...
Unpacking libsmartcols1:arm64 (2.40.2-11) over (2.40.2-10) ...
Setting up libsmartcols1:arm64 (2.40.2-11) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 17123 files and directories currently installed.)
Preparing to unpack .../mount_2.40.2-11_arm64.deb ...
Unpacking mount (2.40.2-11) over (2.40.2-10) ...
Preparing to unpack .../libuuid1_2.40.2-11_arm64.deb ...
Unpacking libuuid1:arm64 (2.40.2-11) over (2.40.2-10) ...
Setting up libuuid1:arm64 (2.40.2-11) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 17123 files and directories currently installed.)
Preparing to unpack .../util-linux_2.40.2-11_arm64.deb ...
Unpacking util-linux (2.40.2-11) over (2.40.2-10) ...
Setting up util-linux (2.40.2-11) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 17120 files and directories currently installed.)
Preparing to unpack .../libpcre2-8-0_10.44-4_arm64.deb ...
Unpacking libpcre2-8-0:arm64 (10.44-4) over (10.42-4+b2) ...
Setting up libpcre2-8-0:arm64 (10.44-4) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 17119 files and directories currently installed.)
Preparing to unpack .../libselinux1_3.7-3+b1_arm64.deb ...
Unpacking libselinux1:arm64 (3.7-3+b1) over (3.7-3) ...
Setting up libselinux1:arm64 (3.7-3+b1) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 17120 files and directories currently installed.)
Preparing to unpack .../libseccomp2_2.5.5-1+b3_arm64.deb ...
Unpacking libseccomp2:arm64 (2.5.5-1+b3) over (2.5.5-1+b2) ...
Setting up libseccomp2:arm64 (2.5.5-1+b3) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 17120 files and directories currently installed.)
Preparing to unpack .../archives/apt_2.9.11_arm64.deb ...
Unpacking apt (2.9.11) over (2.9.10) ...
Setting up apt (2.9.11) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 17117 files and directories currently installed.)
Preparing to unpack .../libaudit-common_1%3a4.0.2-2_all.deb ...
Unpacking libaudit-common (1:4.0.2-2) over (1:4.0.1-3) ...
Setting up libaudit-common (1:4.0.2-2) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 17117 files and directories currently installed.)
Preparing to unpack .../libcap-ng0_0.8.5-3+b1_arm64.deb ...
Unpacking libcap-ng0:arm64 (0.8.5-3+b1) over (0.8.5-3) ...
Setting up libcap-ng0:arm64 (0.8.5-3+b1) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 17118 files and directories currently installed.)
Preparing to unpack .../libaudit1_1%3a4.0.2-2_arm64.deb ...
Unpacking libaudit1:arm64 (1:4.0.2-2) over (1:4.0.1-3) ...
Setting up libaudit1:arm64 (1:4.0.2-2) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 17118 files and directories currently installed.)
Preparing to unpack .../0-login_1%3a4.16.0-2+really2.40.2-11_arm64.deb ...
Unpacking login (1:4.16.0-2+really2.40.2-11) over (1:4.16.0-2+really2.40.2-10) ...
Preparing to unpack .../1-login.defs_1%3a4.16.0-5_all.deb ...
Unpacking login.defs (1:4.16.0-5) over (1:4.16.0-4) ...
Preparing to unpack .../2-libsemanage2_3.7-2+b1_arm64.deb ...
Unpacking libsemanage2:arm64 (3.7-2+b1) over (3.7-2) ...
Preparing to unpack .../3-passwd_1%3a4.16.0-5_arm64.deb ...
Unpacking passwd (1:4.16.0-5) over (1:4.16.0-4) ...
Preparing to unpack .../4-dpkg-dev_1.22.12~1.gbp82cafd_all.deb ...
Unpacking dpkg-dev (1.22.12~1.gbp82cafd) over (1.22.11) ...
Preparing to unpack .../5-libdpkg-perl_1.22.12~1.gbp82cafd_all.deb ...
Unpacking libdpkg-perl (1.22.12~1.gbp82cafd) over (1.22.11) ...
Preparing to unpack .../6-libbrotli1_1.1.0-2+b6_arm64.deb ...
Unpacking libbrotli1:arm64 (1.1.0-2+b6) over (1.1.0-2+b5) ...
Preparing to unpack .../7-libglib2.0-0t64_2.82.2-3_arm64.deb ...
Unpacking libglib2.0-0t64:arm64 (2.82.2-3) over (2.82.2-2) ...
Preparing to unpack .../8-libmarkdown2_2.2.7-2.1_arm64.deb ...
Unpacking libmarkdown2:arm64 (2.2.7-2.1) over (2.2.7-2+b1) ...
Preparing to unpack .../9-libxml2_2.12.7+dfsg+really2.9.14-0.2+b1_arm64.deb ...
Unpacking libxml2:arm64 (2.12.7+dfsg+really2.9.14-0.2+b1) over (2.12.7+dfsg+really2.9.14-0.1) ...
Setting up bsdextrautils (2.40.2-11) ...
Setting up login.defs (1:4.16.0-5) ...
Installing new version of config file /etc/login.defs ...
Setting up libbrotli1:arm64 (1.1.0-2+b6) ...
Setting up libglib2.0-0t64:arm64 (2.82.2-3) ...
No schema files found: doing nothing.
Setting up libdpkg-perl (1.22.12~1.gbp82cafd) ...
Setting up mount (2.40.2-11) ...
Setting up libsemanage2:arm64 (3.7-2+b1) ...
Setting up libxml2:arm64 (2.12.7+dfsg+really2.9.14-0.2+b1) ...
Setting up libmarkdown2:arm64 (2.2.7-2.1) ...
Setting up login (1:4.16.0-2+really2.40.2-11) ...
Setting up dpkg-dev (1.22.12~1.gbp82cafd) ...
Setting up passwd (1:4.16.0-5) ...
Processing triggers for man-db (2.13.0-1) ...
Processing triggers for libc-bin (2.40-3) ...
+------------------------------------------------------------------------------+
| Fetch source files |
+------------------------------------------------------------------------------+
Local sources
-------------
/tmp/debusine-fetch-exec-upload-34zb_fyw/python-aiowithings_3.0.3-2.dsc exists in /tmp/debusine-fetch-exec-upload-34zb_fyw; copying to chroot
I: NOTICE: Log filtering will replace 'build/python-aiowithings-P1XYKc/python-aiowithings-3.0.3' with '<<PKGBUILDDIR>>'
I: NOTICE: Log filtering will replace 'build/python-aiowithings-P1XYKc' with '<<BUILDDIR>>'
+------------------------------------------------------------------------------+
| Install package build dependencies |
+------------------------------------------------------------------------------+
Setup apt archive
-----------------
Merged Build-Depends: debhelper-compat (= 11), dh-python, openstack-pkg-tools, pybuild-plugin-pyproject, python3-all, python3-poetry-core, python3-setuptools, build-essential, fakeroot, python3-aiohttp, python3-aioresponses, python3-covdefaults, python3-pytest, python3-pytest-asyncio, python3-pytest-cov, python3-syrupy, python3-yarl
Filtered Build-Depends: debhelper-compat (= 11), dh-python, openstack-pkg-tools, pybuild-plugin-pyproject, python3-all, python3-poetry-core, python3-setuptools, build-essential, fakeroot, python3-aiohttp, python3-aioresponses, python3-covdefaults, python3-pytest, python3-pytest-asyncio, python3-pytest-cov, python3-syrupy, python3-yarl
dpkg-deb: warning: root directory has unusual owner or group 998:999.
Hint: either pass --root-owner-group, see dpkg-build-api(7) or add an explicit 'Rules-Requires-Root: no' in debian/control.
dpkg-deb: warning: ignoring 1 warning about the control file(s)
dpkg-deb: building package 'sbuild-build-depends-main-dummy' in '/<<RESOLVERDIR>>/apt_archive/sbuild-build-depends-main-dummy.deb'.
Ign:1 copy:/<<RESOLVERDIR>>/apt_archive ./ InRelease
Get:2 copy:/<<RESOLVERDIR>>/apt_archive ./ Release [609 B]
Ign:3 copy:/<<RESOLVERDIR>>/apt_archive ./ Release.gpg
Get:4 copy:/<<RESOLVERDIR>>/apt_archive ./ Sources [899 B]
Get:5 copy:/<<RESOLVERDIR>>/apt_archive ./ Packages [911 B]
Fetched 2419 B in 0s (205 kB/s)
Reading package lists...
Get:1 file:/<<BUILDDIR>>/resolver-F6oucn/apt_archive ./ InRelease
Ign:1 file:/<<BUILDDIR>>/resolver-F6oucn/apt_archive ./ InRelease
Get:2 file:/<<BUILDDIR>>/resolver-F6oucn/apt_archive ./ Release [606 B]
Get:2 file:/<<BUILDDIR>>/resolver-F6oucn/apt_archive ./ Release [606 B]
Get:3 file:/<<BUILDDIR>>/resolver-F6oucn/apt_archive ./ Release.gpg
Ign:3 file:/<<BUILDDIR>>/resolver-F6oucn/apt_archive ./ Release.gpg
Reading package lists...
Reading package lists...
Install main build dependencies (apt-based resolver)
----------------------------------------------------
Installing build dependencies
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
autoconf automake autopoint autotools-dev build-essential cpp cpp-14
cpp-14-aarch64-linux-gnu cpp-aarch64-linux-gnu debhelper dh-autoreconf
dh-python dh-strip-nondeterminism dwz fakeroot g++ g++-14
g++-14-aarch64-linux-gnu g++-aarch64-linux-gnu gcc gcc-14
gcc-14-aarch64-linux-gnu gcc-aarch64-linux-gnu jq libasan8 libc-dev-bin
libc6-dev libcc1-0 libcrypt-dev libdebhelper-perl libelf1t64 libexpat1
libfakeroot libfile-stripnondeterminism-perl libgcc-14-dev libhwasan0
libisl23 libitm1 libjq1 libjs-jquery libjs-jquery-hotkeys
libjs-jquery-isonscreen libjs-jquery-metadata libjs-jquery-tablesorter
libjs-jquery-throttle-debounce liblsan0 libmpc3 libmpfr6 libncursesw6
libnsl2 libonig5 libpython3-stdlib libpython3.12-minimal
libpython3.12-stdlib libpython3.13-minimal libpython3.13-stdlib
libstdc++-14-dev libtirpc-common libtirpc3t64 libtool libtsan2 libubsan1
linux-libc-dev m4 media-types openstack-pkg-tools po-debconf
pybuild-plugin-pyproject python3 python3-aiohappyeyeballs python3-aiohttp
python3-aioresponses python3-aiosignal python3-all python3-async-generator
python3-async-timeout python3-attr python3-autocommand python3-build
python3-covdefaults python3-coverage python3-frozenlist python3-idna
python3-inflect python3-iniconfig python3-installer python3-jaraco.context
python3-jaraco.functools python3-jaraco.text python3-minimal
python3-more-itertools python3-multidict python3-packaging python3-pip
python3-pkg-resources python3-pluggy python3-poetry-core
python3-pyproject-hooks python3-pytest python3-pytest-asyncio
python3-pytest-cov python3-setuptools python3-syrupy python3-toml
python3-typeguard python3-typing-extensions python3-wheel python3-yarl
python3-zipp python3.12 python3.12-minimal python3.13 python3.13-minimal
rpcsvc-proto
Suggested packages:
autoconf-archive gnu-standards autoconf-doc cpp-doc gcc-14-locales
cpp-14-doc dh-make flit gcc-14-doc gcc-multilib manpages-dev flex bison gdb
gcc-doc gdb-aarch64-linux-gnu libc-devtools glibc-doc libstdc++-14-doc
libtool-doc gfortran | fortran95-compiler gcj-jdk m4-doc libmail-box-perl
python3-doc python3-tk python3-venv python-attr-doc python-build-doc
python-coverage-doc python-installer-doc python-setuptools-doc
python3.12-venv python3.12-doc binfmt-support python3.13-venv python3.13-doc
Recommended packages:
manpages manpages-dev libarchive-cpio-perl javascript-common libgpm2
libltdl-dev autopkgtest madison-lite pristine-tar libmail-sendmail-perl
python3-aiodns python3-dev libjs-sphinxdoc python3-pygments
The following NEW packages will be installed:
autoconf automake autopoint autotools-dev build-essential cpp cpp-14
cpp-14-aarch64-linux-gnu cpp-aarch64-linux-gnu debhelper dh-autoreconf
dh-python dh-strip-nondeterminism dwz fakeroot g++ g++-14
g++-14-aarch64-linux-gnu g++-aarch64-linux-gnu gcc gcc-14
gcc-14-aarch64-linux-gnu gcc-aarch64-linux-gnu jq libasan8 libc-dev-bin
libc6-dev libcc1-0 libcrypt-dev libdebhelper-perl libelf1t64 libexpat1
libfakeroot libfile-stripnondeterminism-perl libgcc-14-dev libhwasan0
libisl23 libitm1 libjq1 libjs-jquery libjs-jquery-hotkeys
libjs-jquery-isonscreen libjs-jquery-metadata libjs-jquery-tablesorter
libjs-jquery-throttle-debounce liblsan0 libmpc3 libmpfr6 libncursesw6
libnsl2 libonig5 libpython3-stdlib libpython3.12-minimal
libpython3.12-stdlib libpython3.13-minimal libpython3.13-stdlib
libstdc++-14-dev libtirpc-common libtirpc3t64 libtool libtsan2 libubsan1
linux-libc-dev m4 media-types openstack-pkg-tools po-debconf
pybuild-plugin-pyproject python3 python3-aiohappyeyeballs python3-aiohttp
python3-aioresponses python3-aiosignal python3-all python3-async-generator
python3-async-timeout python3-attr python3-autocommand python3-build
python3-covdefaults python3-coverage python3-frozenlist python3-idna
python3-inflect python3-iniconfig python3-installer python3-jaraco.context
python3-jaraco.functools python3-jaraco.text python3-minimal
python3-more-itertools python3-multidict python3-packaging python3-pip
python3-pkg-resources python3-pluggy python3-poetry-core
python3-pyproject-hooks python3-pytest python3-pytest-asyncio
python3-pytest-cov python3-setuptools python3-syrupy python3-toml
python3-typeguard python3-typing-extensions python3-wheel python3-yarl
python3-zipp python3.12 python3.12-minimal python3.13 python3.13-minimal
rpcsvc-proto sbuild-build-depends-main-dummy
0 upgraded, 115 newly installed, 0 to remove and 0 not upgraded.
Need to get 77.5 MB of archives.
After this operation, 318 MB of additional disk space will be used.
Get:1 copy:/<<RESOLVERDIR>>/apt_archive ./ sbuild-build-depends-main-dummy 0.invalid.0 [996 B]
Get:2 http://deb.debian.org/debian sid/main arm64 libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [326 kB]
Get:3 http://deb.debian.org/debian sid/main arm64 libjs-jquery-hotkeys all 0~20130707+git2d51e3a9+dfsg-2.1 [11.5 kB]
Get:4 http://deb.debian.org/debian sid/main arm64 libpython3.12-minimal arm64 3.12.7-3 [808 kB]
Get:5 http://deb.debian.org/debian sid/main arm64 libexpat1 arm64 2.6.4-1 [90.7 kB]
Get:6 http://deb.debian.org/debian sid/main arm64 python3.12-minimal arm64 3.12.7-3 [1940 kB]
Get:7 http://deb.debian.org/debian sid/main arm64 python3-minimal arm64 3.12.7-1 [26.8 kB]
Get:8 http://deb.debian.org/debian sid/main arm64 media-types all 10.1.0 [26.9 kB]
Get:9 http://deb.debian.org/debian sid/main arm64 libncursesw6 arm64 6.5-2+b1 [125 kB]
Get:10 http://deb.debian.org/debian sid/main arm64 libtirpc-common all 1.3.4+ds-1.3 [10.9 kB]
Get:11 http://deb.debian.org/debian sid/main arm64 libtirpc3t64 arm64 1.3.4+ds-1.3+b1 [78.7 kB]
Get:12 http://deb.debian.org/debian sid/main arm64 libnsl2 arm64 1.3.0-3+b3 [37.9 kB]
Get:13 http://deb.debian.org/debian sid/main arm64 libpython3.12-stdlib arm64 3.12.7-3 [1902 kB]
Get:14 http://deb.debian.org/debian sid/main arm64 python3.12 arm64 3.12.7-3 [671 kB]
Get:15 http://deb.debian.org/debian sid/main arm64 libpython3-stdlib arm64 3.12.7-1 [9708 B]
Get:16 http://deb.debian.org/debian sid/main arm64 python3 arm64 3.12.7-1 [27.8 kB]
Get:17 http://deb.debian.org/debian sid/main arm64 libpython3.13-minimal arm64 3.13.0-2 [850 kB]
Get:18 http://deb.debian.org/debian sid/main arm64 python3.13-minimal arm64 3.13.0-2 [1838 kB]
Get:19 http://deb.debian.org/debian sid/main arm64 m4 arm64 1.4.19-4 [277 kB]
Get:20 http://deb.debian.org/debian sid/main arm64 autoconf all 2.72-3 [493 kB]
Get:21 http://deb.debian.org/debian sid/main arm64 autotools-dev all 20220109.1 [51.6 kB]
Get:22 http://deb.debian.org/debian sid/main arm64 automake all 1:1.16.5-1.3 [823 kB]
Get:23 http://deb.debian.org/debian sid/main arm64 autopoint all 0.22.5-2 [723 kB]
Get:24 http://deb.debian.org/debian sid/main arm64 libc-dev-bin arm64 2.40-3 [50.9 kB]
Get:25 http://deb.debian.org/debian sid/main arm64 linux-libc-dev all 6.11.7-1 [2454 kB]
Get:26 http://deb.debian.org/debian sid/main arm64 libcrypt-dev arm64 1:4.4.36-5 [122 kB]
Get:27 http://deb.debian.org/debian sid/main arm64 rpcsvc-proto arm64 1.4.3-1+b1 [60.5 kB]
Get:28 http://deb.debian.org/debian sid/main arm64 libc6-dev arm64 2.40-3 [1591 kB]
Get:29 http://deb.debian.org/debian sid/main arm64 libisl23 arm64 0.27-1 [601 kB]
Get:30 http://deb.debian.org/debian sid/main arm64 libmpfr6 arm64 4.2.1-1+b2 [680 kB]
Get:31 http://deb.debian.org/debian sid/main arm64 libmpc3 arm64 1.3.1-1+b3 [50.5 kB]
Get:32 http://deb.debian.org/debian sid/main arm64 cpp-14-aarch64-linux-gnu arm64 14.2.0-8 [9166 kB]
Get:33 http://deb.debian.org/debian sid/main arm64 cpp-14 arm64 14.2.0-8 [1284 B]
Get:34 http://deb.debian.org/debian sid/main arm64 cpp-aarch64-linux-gnu arm64 4:14.2.0-1 [4832 B]
Get:35 http://deb.debian.org/debian sid/main arm64 cpp arm64 4:14.2.0-1 [1568 B]
Get:36 http://deb.debian.org/debian sid/main arm64 libcc1-0 arm64 14.2.0-8 [42.2 kB]
Get:37 http://deb.debian.org/debian sid/main arm64 libitm1 arm64 14.2.0-8 [24.2 kB]
Get:38 http://deb.debian.org/debian sid/main arm64 libasan8 arm64 14.2.0-8 [2579 kB]
Get:39 http://deb.debian.org/debian sid/main arm64 liblsan0 arm64 14.2.0-8 [1161 kB]
Get:40 http://deb.debian.org/debian sid/main arm64 libtsan2 arm64 14.2.0-8 [2386 kB]
Get:41 http://deb.debian.org/debian sid/main arm64 libubsan1 arm64 14.2.0-8 [1039 kB]
Get:42 http://deb.debian.org/debian sid/main arm64 libhwasan0 arm64 14.2.0-8 [1442 kB]
Get:43 http://deb.debian.org/debian sid/main arm64 libgcc-14-dev arm64 14.2.0-8 [2365 kB]
Get:44 http://deb.debian.org/debian sid/main arm64 gcc-14-aarch64-linux-gnu arm64 14.2.0-8 [17.7 MB]
Get:45 http://deb.debian.org/debian sid/main arm64 gcc-14 arm64 14.2.0-8 [519 kB]
Get:46 http://deb.debian.org/debian sid/main arm64 gcc-aarch64-linux-gnu arm64 4:14.2.0-1 [1440 B]
Get:47 http://deb.debian.org/debian sid/main arm64 gcc arm64 4:14.2.0-1 [5136 B]
Get:48 http://deb.debian.org/debian sid/main arm64 libstdc++-14-dev arm64 14.2.0-8 [2267 kB]
Get:49 http://deb.debian.org/debian sid/main arm64 g++-14-aarch64-linux-gnu arm64 14.2.0-8 [10.1 MB]
Get:50 http://deb.debian.org/debian sid/main arm64 g++-14 arm64 14.2.0-8 [20.2 kB]
Get:51 http://deb.debian.org/debian sid/main arm64 g++-aarch64-linux-gnu arm64 4:14.2.0-1 [1200 B]
Get:52 http://deb.debian.org/debian sid/main arm64 g++ arm64 4:14.2.0-1 [1332 B]
Get:53 http://deb.debian.org/debian sid/main arm64 build-essential arm64 12.12 [4624 B]
Get:54 http://deb.debian.org/debian sid/main arm64 libdebhelper-perl all 13.20 [89.7 kB]
Get:55 http://deb.debian.org/debian sid/main arm64 libtool all 2.4.7-8 [517 kB]
Get:56 http://deb.debian.org/debian sid/main arm64 dh-autoreconf all 20 [17.1 kB]
Get:57 http://deb.debian.org/debian sid/main arm64 libfile-stripnondeterminism-perl all 1.14.0-1 [19.5 kB]
Get:58 http://deb.debian.org/debian sid/main arm64 dh-strip-nondeterminism all 1.14.0-1 [8448 B]
Get:59 http://deb.debian.org/debian sid/main arm64 libelf1t64 arm64 0.192-4 [189 kB]
Get:60 http://deb.debian.org/debian sid/main arm64 dwz arm64 0.15-1+b1 [102 kB]
Get:61 http://deb.debian.org/debian sid/main arm64 po-debconf all 1.0.21+nmu1 [248 kB]
Get:62 http://deb.debian.org/debian sid/main arm64 debhelper all 13.20 [915 kB]
Get:63 http://deb.debian.org/debian sid/main arm64 python3-autocommand all 2.2.2-3 [13.6 kB]
Get:64 http://deb.debian.org/debian sid/main arm64 python3-more-itertools all 10.5.0-1 [63.8 kB]
Get:65 http://deb.debian.org/debian sid/main arm64 python3-typing-extensions all 4.12.2-2 [73.0 kB]
Get:66 http://deb.debian.org/debian sid/main arm64 python3-typeguard all 4.4.1-1 [37.0 kB]
Get:67 http://deb.debian.org/debian sid/main arm64 python3-inflect all 7.3.1-2 [32.4 kB]
Get:68 http://deb.debian.org/debian sid/main arm64 python3-jaraco.context all 6.0.0-1 [7984 B]
Get:69 http://deb.debian.org/debian sid/main arm64 python3-jaraco.functools all 4.1.0-1 [12.0 kB]
Get:70 http://deb.debian.org/debian sid/main arm64 python3-pkg-resources all 75.2.0-1 [213 kB]
Get:71 http://deb.debian.org/debian sid/main arm64 python3-jaraco.text all 4.0.0-1 [11.4 kB]
Get:72 http://deb.debian.org/debian sid/main arm64 python3-zipp all 3.21.0-1 [10.6 kB]
Get:73 http://deb.debian.org/debian sid/main arm64 python3-setuptools all 75.2.0-1 [731 kB]
Get:74 http://deb.debian.org/debian sid/main arm64 dh-python all 6.20241024 [109 kB]
Get:75 http://deb.debian.org/debian sid/main arm64 libfakeroot arm64 1.36-1 [29.1 kB]
Get:76 http://deb.debian.org/debian sid/main arm64 fakeroot arm64 1.36-1 [74.4 kB]
Get:77 http://deb.debian.org/debian sid/main arm64 libonig5 arm64 6.9.9-1+b1 [181 kB]
Get:78 http://deb.debian.org/debian sid/main arm64 libjq1 arm64 1.7.1-3+b1 [148 kB]
Get:79 http://deb.debian.org/debian sid/main arm64 jq arm64 1.7.1-3+b1 [77.3 kB]
Get:80 http://deb.debian.org/debian sid/main arm64 libjs-jquery-isonscreen all 1.2.0-1.1 [3196 B]
Get:81 http://deb.debian.org/debian sid/main arm64 libjs-jquery-metadata all 12-4 [6532 B]
Get:82 http://deb.debian.org/debian sid/main arm64 libjs-jquery-tablesorter all 1:2.31.3+dfsg1-4 [184 kB]
Get:83 http://deb.debian.org/debian sid/main arm64 libjs-jquery-throttle-debounce all 1.1+dfsg.1-2 [12.2 kB]
Get:84 http://deb.debian.org/debian sid/main arm64 libpython3.13-stdlib arm64 3.13.0-2 [1922 kB]
Get:85 http://deb.debian.org/debian sid/main arm64 python3-wheel all 0.45.0-1 [56.7 kB]
Get:86 http://deb.debian.org/debian sid/main arm64 python3-pip all 24.3.1+dfsg-1 [1441 kB]
Get:87 http://deb.debian.org/debian sid/main arm64 openstack-pkg-tools all 130 [96.4 kB]
Get:88 http://deb.debian.org/debian sid/main arm64 python3-packaging all 24.2-1 [55.3 kB]
Get:89 http://deb.debian.org/debian sid/main arm64 python3-pyproject-hooks all 1.2.0-1 [11.7 kB]
Get:90 http://deb.debian.org/debian sid/main arm64 python3-toml all 0.10.2-1 [16.2 kB]
Get:91 http://deb.debian.org/debian sid/main arm64 python3-build all 1.2.2-1 [36.0 kB]
Get:92 http://deb.debian.org/debian sid/main arm64 python3-installer all 0.7.0+dfsg1-3 [18.6 kB]
Get:93 http://deb.debian.org/debian sid/main arm64 pybuild-plugin-pyproject all 6.20241024 [11.4 kB]
Get:94 http://deb.debian.org/debian sid/main arm64 python3-aiohappyeyeballs all 2.4.3-1 [13.3 kB]
Get:95 http://deb.debian.org/debian sid/main arm64 python3-idna all 3.8-2 [41.6 kB]
Get:96 http://deb.debian.org/debian sid/main arm64 python3-multidict arm64 6.1.0-1+b1 [37.8 kB]
Get:97 http://deb.debian.org/debian sid/main arm64 python3-yarl arm64 1.13.1-1+b1 [106 kB]
Get:98 http://deb.debian.org/debian sid/main arm64 python3-async-timeout all 5.0.1-1 [8324 B]
Get:99 http://deb.debian.org/debian sid/main arm64 python3-frozenlist arm64 1.5.0-1+b2 [53.8 kB]
Get:100 http://deb.debian.org/debian sid/main arm64 python3-aiosignal all 1.3.1-1 [6016 B]
Get:101 http://deb.debian.org/debian sid/main arm64 python3-attr all 24.2.0-1 [68.4 kB]
Get:102 http://deb.debian.org/debian sid/main arm64 python3-aiohttp arm64 3.10.10-2 [332 kB]
Get:103 http://deb.debian.org/debian sid/main arm64 python3-aioresponses all 0.7.6-2 [10.9 kB]
Get:104 http://deb.debian.org/debian sid/main arm64 python3.13 arm64 3.13.0-2 [730 kB]
Get:105 http://deb.debian.org/debian sid/main arm64 python3-all arm64 3.12.7-1 [1052 B]
Get:106 http://deb.debian.org/debian sid/main arm64 python3-async-generator all 1.10-4 [17.4 kB]
Get:107 http://deb.debian.org/debian sid/main arm64 python3-coverage arm64 7.6.0+dfsg1-2+b1 [177 kB]
Get:108 http://deb.debian.org/debian sid/main arm64 python3-covdefaults all 2.3.0-2 [7692 B]
Get:109 http://deb.debian.org/debian sid/main arm64 python3-iniconfig all 1.1.1-2 [6396 B]
Get:110 http://deb.debian.org/debian sid/main arm64 python3-pluggy all 1.5.0-1 [26.9 kB]
Get:111 http://deb.debian.org/debian sid/main arm64 python3-poetry-core all 1.9.0-2 [210 kB]
Get:112 http://deb.debian.org/debian sid/main arm64 python3-pytest all 8.3.3-1 [249 kB]
Get:113 http://deb.debian.org/debian sid/main arm64 python3-pytest-asyncio all 0.24.0a1-1 [15.6 kB]
Get:114 http://deb.debian.org/debian sid/main arm64 python3-pytest-cov all 5.0.0-1 [26.8 kB]
Get:115 http://deb.debian.org/debian sid/main arm64 python3-syrupy all 4.7.2-1 [53.0 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 77.5 MB in 1s (84.5 MB/s)
Selecting previously unselected package libjs-jquery.
(Reading database ... 17119 files and directories currently installed.)
Preparing to unpack .../libjs-jquery_3.6.1+dfsg+~3.5.14-1_all.deb ...
Unpacking libjs-jquery (3.6.1+dfsg+~3.5.14-1) ...
Selecting previously unselected package libjs-jquery-hotkeys.
Preparing to unpack .../libjs-jquery-hotkeys_0~20130707+git2d51e3a9+dfsg-2.1_all.deb ...
Unpacking libjs-jquery-hotkeys (0~20130707+git2d51e3a9+dfsg-2.1) ...
Selecting previously unselected package libpython3.12-minimal:arm64.
Preparing to unpack .../libpython3.12-minimal_3.12.7-3_arm64.deb ...
Unpacking libpython3.12-minimal:arm64 (3.12.7-3) ...
Selecting previously unselected package libexpat1:arm64.
Preparing to unpack .../libexpat1_2.6.4-1_arm64.deb ...
Unpacking libexpat1:arm64 (2.6.4-1) ...
Selecting previously unselected package python3.12-minimal.
Preparing to unpack .../python3.12-minimal_3.12.7-3_arm64.deb ...
Unpacking python3.12-minimal (3.12.7-3) ...
Setting up libpython3.12-minimal:arm64 (3.12.7-3) ...
Setting up libexpat1:arm64 (2.6.4-1) ...
Setting up python3.12-minimal (3.12.7-3) ...
Selecting previously unselected package python3-minimal.
(Reading database ... 17465 files and directories currently installed.)
Preparing to unpack .../0-python3-minimal_3.12.7-1_arm64.deb ...
Unpacking python3-minimal (3.12.7-1) ...
Selecting previously unselected package media-types.
Preparing to unpack .../1-media-types_10.1.0_all.deb ...
Unpacking media-types (10.1.0) ...
Selecting previously unselected package libncursesw6:arm64.
Preparing to unpack .../2-libncursesw6_6.5-2+b1_arm64.deb ...
Unpacking libncursesw6:arm64 (6.5-2+b1) ...
Selecting previously unselected package libtirpc-common.
Preparing to unpack .../3-libtirpc-common_1.3.4+ds-1.3_all.deb ...
Unpacking libtirpc-common (1.3.4+ds-1.3) ...
Selecting previously unselected package libtirpc3t64:arm64.
Preparing to unpack .../4-libtirpc3t64_1.3.4+ds-1.3+b1_arm64.deb ...
Adding 'diversion of /lib/aarch64-linux-gnu/libtirpc.so.3 to /lib/aarch64-linux-gnu/libtirpc.so.3.usr-is-merged by libtirpc3t64'
Adding 'diversion of /lib/aarch64-linux-gnu/libtirpc.so.3.0.0 to /lib/aarch64-linux-gnu/libtirpc.so.3.0.0.usr-is-merged by libtirpc3t64'
Unpacking libtirpc3t64:arm64 (1.3.4+ds-1.3+b1) ...
Selecting previously unselected package libnsl2:arm64.
Preparing to unpack .../5-libnsl2_1.3.0-3+b3_arm64.deb ...
Unpacking libnsl2:arm64 (1.3.0-3+b3) ...
Selecting previously unselected package libpython3.12-stdlib:arm64.
Preparing to unpack .../6-libpython3.12-stdlib_3.12.7-3_arm64.deb ...
Unpacking libpython3.12-stdlib:arm64 (3.12.7-3) ...
Selecting previously unselected package python3.12.
Preparing to unpack .../7-python3.12_3.12.7-3_arm64.deb ...
Unpacking python3.12 (3.12.7-3) ...
Selecting previously unselected package libpython3-stdlib:arm64.
Preparing to unpack .../8-libpython3-stdlib_3.12.7-1_arm64.deb ...
Unpacking libpython3-stdlib:arm64 (3.12.7-1) ...
Setting up python3-minimal (3.12.7-1) ...
Selecting previously unselected package python3.
(Reading database ... 17938 files and directories currently installed.)
Preparing to unpack .../000-python3_3.12.7-1_arm64.deb ...
Unpacking python3 (3.12.7-1) ...
Selecting previously unselected package libpython3.13-minimal:arm64.
Preparing to unpack .../001-libpython3.13-minimal_3.13.0-2_arm64.deb ...
Unpacking libpython3.13-minimal:arm64 (3.13.0-2) ...
Selecting previously unselected package python3.13-minimal.
Preparing to unpack .../002-python3.13-minimal_3.13.0-2_arm64.deb ...
Unpacking python3.13-minimal (3.13.0-2) ...
Selecting previously unselected package m4.
Preparing to unpack .../003-m4_1.4.19-4_arm64.deb ...
Unpacking m4 (1.4.19-4) ...
Selecting previously unselected package autoconf.
Preparing to unpack .../004-autoconf_2.72-3_all.deb ...
Unpacking autoconf (2.72-3) ...
Selecting previously unselected package autotools-dev.
Preparing to unpack .../005-autotools-dev_20220109.1_all.deb ...
Unpacking autotools-dev (20220109.1) ...
Selecting previously unselected package automake.
Preparing to unpack .../006-automake_1%3a1.16.5-1.3_all.deb ...
Unpacking automake (1:1.16.5-1.3) ...
Selecting previously unselected package autopoint.
Preparing to unpack .../007-autopoint_0.22.5-2_all.deb ...
Unpacking autopoint (0.22.5-2) ...
Selecting previously unselected package libc-dev-bin.
Preparing to unpack .../008-libc-dev-bin_2.40-3_arm64.deb ...
Unpacking libc-dev-bin (2.40-3) ...
Selecting previously unselected package linux-libc-dev.
Preparing to unpack .../009-linux-libc-dev_6.11.7-1_all.deb ...
Unpacking linux-libc-dev (6.11.7-1) ...
Selecting previously unselected package libcrypt-dev:arm64.
Preparing to unpack .../010-libcrypt-dev_1%3a4.4.36-5_arm64.deb ...
Unpacking libcrypt-dev:arm64 (1:4.4.36-5) ...
Selecting previously unselected package rpcsvc-proto.
Preparing to unpack .../011-rpcsvc-proto_1.4.3-1+b1_arm64.deb ...
Unpacking rpcsvc-proto (1.4.3-1+b1) ...
Selecting previously unselected package libc6-dev:arm64.
Preparing to unpack .../012-libc6-dev_2.40-3_arm64.deb ...
Unpacking libc6-dev:arm64 (2.40-3) ...
Selecting previously unselected package libisl23:arm64.
Preparing to unpack .../013-libisl23_0.27-1_arm64.deb ...
Unpacking libisl23:arm64 (0.27-1) ...
Selecting previously unselected package libmpfr6:arm64.
Preparing to unpack .../014-libmpfr6_4.2.1-1+b2_arm64.deb ...
Unpacking libmpfr6:arm64 (4.2.1-1+b2) ...
Selecting previously unselected package libmpc3:arm64.
Preparing to unpack .../015-libmpc3_1.3.1-1+b3_arm64.deb ...
Unpacking libmpc3:arm64 (1.3.1-1+b3) ...
Selecting previously unselected package cpp-14-aarch64-linux-gnu.
Preparing to unpack .../016-cpp-14-aarch64-linux-gnu_14.2.0-8_arm64.deb ...
Unpacking cpp-14-aarch64-linux-gnu (14.2.0-8) ...
Selecting previously unselected package cpp-14.
Preparing to unpack .../017-cpp-14_14.2.0-8_arm64.deb ...
Unpacking cpp-14 (14.2.0-8) ...
Selecting previously unselected package cpp-aarch64-linux-gnu.
Preparing to unpack .../018-cpp-aarch64-linux-gnu_4%3a14.2.0-1_arm64.deb ...
Unpacking cpp-aarch64-linux-gnu (4:14.2.0-1) ...
Selecting previously unselected package cpp.
Preparing to unpack .../019-cpp_4%3a14.2.0-1_arm64.deb ...
Unpacking cpp (4:14.2.0-1) ...
Selecting previously unselected package libcc1-0:arm64.
Preparing to unpack .../020-libcc1-0_14.2.0-8_arm64.deb ...
Unpacking libcc1-0:arm64 (14.2.0-8) ...
Selecting previously unselected package libitm1:arm64.
Preparing to unpack .../021-libitm1_14.2.0-8_arm64.deb ...
Unpacking libitm1:arm64 (14.2.0-8) ...
Selecting previously unselected package libasan8:arm64.
Preparing to unpack .../022-libasan8_14.2.0-8_arm64.deb ...
Unpacking libasan8:arm64 (14.2.0-8) ...
Selecting previously unselected package liblsan0:arm64.
Preparing to unpack .../023-liblsan0_14.2.0-8_arm64.deb ...
Unpacking liblsan0:arm64 (14.2.0-8) ...
Selecting previously unselected package libtsan2:arm64.
Preparing to unpack .../024-libtsan2_14.2.0-8_arm64.deb ...
Unpacking libtsan2:arm64 (14.2.0-8) ...
Selecting previously unselected package libubsan1:arm64.
Preparing to unpack .../025-libubsan1_14.2.0-8_arm64.deb ...
Unpacking libubsan1:arm64 (14.2.0-8) ...
Selecting previously unselected package libhwasan0:arm64.
Preparing to unpack .../026-libhwasan0_14.2.0-8_arm64.deb ...
Unpacking libhwasan0:arm64 (14.2.0-8) ...
Selecting previously unselected package libgcc-14-dev:arm64.
Preparing to unpack .../027-libgcc-14-dev_14.2.0-8_arm64.deb ...
Unpacking libgcc-14-dev:arm64 (14.2.0-8) ...
Selecting previously unselected package gcc-14-aarch64-linux-gnu.
Preparing to unpack .../028-gcc-14-aarch64-linux-gnu_14.2.0-8_arm64.deb ...
Unpacking gcc-14-aarch64-linux-gnu (14.2.0-8) ...
Selecting previously unselected package gcc-14.
Preparing to unpack .../029-gcc-14_14.2.0-8_arm64.deb ...
Unpacking gcc-14 (14.2.0-8) ...
Selecting previously unselected package gcc-aarch64-linux-gnu.
Preparing to unpack .../030-gcc-aarch64-linux-gnu_4%3a14.2.0-1_arm64.deb ...
Unpacking gcc-aarch64-linux-gnu (4:14.2.0-1) ...
Selecting previously unselected package gcc.
Preparing to unpack .../031-gcc_4%3a14.2.0-1_arm64.deb ...
Unpacking gcc (4:14.2.0-1) ...
Selecting previously unselected package libstdc++-14-dev:arm64.
Preparing to unpack .../032-libstdc++-14-dev_14.2.0-8_arm64.deb ...
Unpacking libstdc++-14-dev:arm64 (14.2.0-8) ...
Selecting previously unselected package g++-14-aarch64-linux-gnu.
Preparing to unpack .../033-g++-14-aarch64-linux-gnu_14.2.0-8_arm64.deb ...
Unpacking g++-14-aarch64-linux-gnu (14.2.0-8) ...
Selecting previously unselected package g++-14.
Preparing to unpack .../034-g++-14_14.2.0-8_arm64.deb ...
Unpacking g++-14 (14.2.0-8) ...
Selecting previously unselected package g++-aarch64-linux-gnu.
Preparing to unpack .../035-g++-aarch64-linux-gnu_4%3a14.2.0-1_arm64.deb ...
Unpacking g++-aarch64-linux-gnu (4:14.2.0-1) ...
Selecting previously unselected package g++.
Preparing to unpack .../036-g++_4%3a14.2.0-1_arm64.deb ...
Unpacking g++ (4:14.2.0-1) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../037-build-essential_12.12_arm64.deb ...
Unpacking build-essential (12.12) ...
Selecting previously unselected package libdebhelper-perl.
Preparing to unpack .../038-libdebhelper-perl_13.20_all.deb ...
Unpacking libdebhelper-perl (13.20) ...
Selecting previously unselected package libtool.
Preparing to unpack .../039-libtool_2.4.7-8_all.deb ...
Unpacking libtool (2.4.7-8) ...
Selecting previously unselected package dh-autoreconf.
Preparing to unpack .../040-dh-autoreconf_20_all.deb ...
Unpacking dh-autoreconf (20) ...
Selecting previously unselected package libfile-stripnondeterminism-perl.
Preparing to unpack .../041-libfile-stripnondeterminism-perl_1.14.0-1_all.deb ...
Unpacking libfile-stripnondeterminism-perl (1.14.0-1) ...
Selecting previously unselected package dh-strip-nondeterminism.
Preparing to unpack .../042-dh-strip-nondeterminism_1.14.0-1_all.deb ...
Unpacking dh-strip-nondeterminism (1.14.0-1) ...
Selecting previously unselected package libelf1t64:arm64.
Preparing to unpack .../043-libelf1t64_0.192-4_arm64.deb ...
Unpacking libelf1t64:arm64 (0.192-4) ...
Selecting previously unselected package dwz.
Preparing to unpack .../044-dwz_0.15-1+b1_arm64.deb ...
Unpacking dwz (0.15-1+b1) ...
Selecting previously unselected package po-debconf.
Preparing to unpack .../045-po-debconf_1.0.21+nmu1_all.deb ...
Unpacking po-debconf (1.0.21+nmu1) ...
Selecting previously unselected package debhelper.
Preparing to unpack .../046-debhelper_13.20_all.deb ...
Unpacking debhelper (13.20) ...
Selecting previously unselected package python3-autocommand.
Preparing to unpack .../047-python3-autocommand_2.2.2-3_all.deb ...
Unpacking python3-autocommand (2.2.2-3) ...
Selecting previously unselected package python3-more-itertools.
Preparing to unpack .../048-python3-more-itertools_10.5.0-1_all.deb ...
Unpacking python3-more-itertools (10.5.0-1) ...
Selecting previously unselected package python3-typing-extensions.
Preparing to unpack .../049-python3-typing-extensions_4.12.2-2_all.deb ...
Unpacking python3-typing-extensions (4.12.2-2) ...
Selecting previously unselected package python3-typeguard.
Preparing to unpack .../050-python3-typeguard_4.4.1-1_all.deb ...
Unpacking python3-typeguard (4.4.1-1) ...
Selecting previously unselected package python3-inflect.
Preparing to unpack .../051-python3-inflect_7.3.1-2_all.deb ...
Unpacking python3-inflect (7.3.1-2) ...
Selecting previously unselected package python3-jaraco.context.
Preparing to unpack .../052-python3-jaraco.context_6.0.0-1_all.deb ...
Unpacking python3-jaraco.context (6.0.0-1) ...
Selecting previously unselected package python3-jaraco.functools.
Preparing to unpack .../053-python3-jaraco.functools_4.1.0-1_all.deb ...
Unpacking python3-jaraco.functools (4.1.0-1) ...
Selecting previously unselected package python3-pkg-resources.
Preparing to unpack .../054-python3-pkg-resources_75.2.0-1_all.deb ...
Unpacking python3-pkg-resources (75.2.0-1) ...
Selecting previously unselected package python3-jaraco.text.
Preparing to unpack .../055-python3-jaraco.text_4.0.0-1_all.deb ...
Unpacking python3-jaraco.text (4.0.0-1) ...
Selecting previously unselected package python3-zipp.
Preparing to unpack .../056-python3-zipp_3.21.0-1_all.deb ...
Unpacking python3-zipp (3.21.0-1) ...
Selecting previously unselected package python3-setuptools.
Preparing to unpack .../057-python3-setuptools_75.2.0-1_all.deb ...
Unpacking python3-setuptools (75.2.0-1) ...
Selecting previously unselected package dh-python.
Preparing to unpack .../058-dh-python_6.20241024_all.deb ...
Unpacking dh-python (6.20241024) ...
Selecting previously unselected package libfakeroot:arm64.
Preparing to unpack .../059-libfakeroot_1.36-1_arm64.deb ...
Unpacking libfakeroot:arm64 (1.36-1) ...
Selecting previously unselected package fakeroot.
Preparing to unpack .../060-fakeroot_1.36-1_arm64.deb ...
Unpacking fakeroot (1.36-1) ...
Selecting previously unselected package libonig5:arm64.
Preparing to unpack .../061-libonig5_6.9.9-1+b1_arm64.deb ...
Unpacking libonig5:arm64 (6.9.9-1+b1) ...
Selecting previously unselected package libjq1:arm64.
Preparing to unpack .../062-libjq1_1.7.1-3+b1_arm64.deb ...
Unpacking libjq1:arm64 (1.7.1-3+b1) ...
Selecting previously unselected package jq.
Preparing to unpack .../063-jq_1.7.1-3+b1_arm64.deb ...
Unpacking jq (1.7.1-3+b1) ...
Selecting previously unselected package libjs-jquery-isonscreen.
Preparing to unpack .../064-libjs-jquery-isonscreen_1.2.0-1.1_all.deb ...
Unpacking libjs-jquery-isonscreen (1.2.0-1.1) ...
Selecting previously unselected package libjs-jquery-metadata.
Preparing to unpack .../065-libjs-jquery-metadata_12-4_all.deb ...
Unpacking libjs-jquery-metadata (12-4) ...
Selecting previously unselected package libjs-jquery-tablesorter.
Preparing to unpack .../066-libjs-jquery-tablesorter_1%3a2.31.3+dfsg1-4_all.deb ...
Unpacking libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ...
Selecting previously unselected package libjs-jquery-throttle-debounce.
Preparing to unpack .../067-libjs-jquery-throttle-debounce_1.1+dfsg.1-2_all.deb ...
Unpacking libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ...
Selecting previously unselected package libpython3.13-stdlib:arm64.
Preparing to unpack .../068-libpython3.13-stdlib_3.13.0-2_arm64.deb ...
Unpacking libpython3.13-stdlib:arm64 (3.13.0-2) ...
Selecting previously unselected package python3-wheel.
Preparing to unpack .../069-python3-wheel_0.45.0-1_all.deb ...
Unpacking python3-wheel (0.45.0-1) ...
Selecting previously unselected package python3-pip.
Preparing to unpack .../070-python3-pip_24.3.1+dfsg-1_all.deb ...
Unpacking python3-pip (24.3.1+dfsg-1) ...
Selecting previously unselected package openstack-pkg-tools.
Preparing to unpack .../071-openstack-pkg-tools_130_all.deb ...
Unpacking openstack-pkg-tools (130) ...
Selecting previously unselected package python3-packaging.
Preparing to unpack .../072-python3-packaging_24.2-1_all.deb ...
Unpacking python3-packaging (24.2-1) ...
Selecting previously unselected package python3-pyproject-hooks.
Preparing to unpack .../073-python3-pyproject-hooks_1.2.0-1_all.deb ...
Unpacking python3-pyproject-hooks (1.2.0-1) ...
Selecting previously unselected package python3-toml.
Preparing to unpack .../074-python3-toml_0.10.2-1_all.deb ...
Unpacking python3-toml (0.10.2-1) ...
Selecting previously unselected package python3-build.
Preparing to unpack .../075-python3-build_1.2.2-1_all.deb ...
Unpacking python3-build (1.2.2-1) ...
Selecting previously unselected package python3-installer.
Preparing to unpack .../076-python3-installer_0.7.0+dfsg1-3_all.deb ...
Unpacking python3-installer (0.7.0+dfsg1-3) ...
Selecting previously unselected package pybuild-plugin-pyproject.
Preparing to unpack .../077-pybuild-plugin-pyproject_6.20241024_all.deb ...
Unpacking pybuild-plugin-pyproject (6.20241024) ...
Selecting previously unselected package python3-aiohappyeyeballs.
Preparing to unpack .../078-python3-aiohappyeyeballs_2.4.3-1_all.deb ...
Unpacking python3-aiohappyeyeballs (2.4.3-1) ...
Selecting previously unselected package python3-idna.
Preparing to unpack .../079-python3-idna_3.8-2_all.deb ...
Unpacking python3-idna (3.8-2) ...
Selecting previously unselected package python3-multidict.
Preparing to unpack .../080-python3-multidict_6.1.0-1+b1_arm64.deb ...
Unpacking python3-multidict (6.1.0-1+b1) ...
Selecting previously unselected package python3-yarl.
Preparing to unpack .../081-python3-yarl_1.13.1-1+b1_arm64.deb ...
Unpacking python3-yarl (1.13.1-1+b1) ...
Selecting previously unselected package python3-async-timeout.
Preparing to unpack .../082-python3-async-timeout_5.0.1-1_all.deb ...
Unpacking python3-async-timeout (5.0.1-1) ...
Selecting previously unselected package python3-frozenlist.
Preparing to unpack .../083-python3-frozenlist_1.5.0-1+b2_arm64.deb ...
Unpacking python3-frozenlist (1.5.0-1+b2) ...
Selecting previously unselected package python3-aiosignal.
Preparing to unpack .../084-python3-aiosignal_1.3.1-1_all.deb ...
Unpacking python3-aiosignal (1.3.1-1) ...
Selecting previously unselected package python3-attr.
Preparing to unpack .../085-python3-attr_24.2.0-1_all.deb ...
Unpacking python3-attr (24.2.0-1) ...
Selecting previously unselected package python3-aiohttp.
Preparing to unpack .../086-python3-aiohttp_3.10.10-2_arm64.deb ...
Unpacking python3-aiohttp (3.10.10-2) ...
Selecting previously unselected package python3-aioresponses.
Preparing to unpack .../087-python3-aioresponses_0.7.6-2_all.deb ...
Unpacking python3-aioresponses (0.7.6-2) ...
Selecting previously unselected package python3.13.
Preparing to unpack .../088-python3.13_3.13.0-2_arm64.deb ...
Unpacking python3.13 (3.13.0-2) ...
Selecting previously unselected package python3-all.
Preparing to unpack .../089-python3-all_3.12.7-1_arm64.deb ...
Unpacking python3-all (3.12.7-1) ...
Selecting previously unselected package python3-async-generator.
Preparing to unpack .../090-python3-async-generator_1.10-4_all.deb ...
Unpacking python3-async-generator (1.10-4) ...
Selecting previously unselected package python3-coverage.
Preparing to unpack .../091-python3-coverage_7.6.0+dfsg1-2+b1_arm64.deb ...
Unpacking python3-coverage (7.6.0+dfsg1-2+b1) ...
Selecting previously unselected package python3-covdefaults.
Preparing to unpack .../092-python3-covdefaults_2.3.0-2_all.deb ...
Unpacking python3-covdefaults (2.3.0-2) ...
Selecting previously unselected package python3-iniconfig.
Preparing to unpack .../093-python3-iniconfig_1.1.1-2_all.deb ...
Unpacking python3-iniconfig (1.1.1-2) ...
Selecting previously unselected package python3-pluggy.
Preparing to unpack .../094-python3-pluggy_1.5.0-1_all.deb ...
Unpacking python3-pluggy (1.5.0-1) ...
Selecting previously unselected package python3-poetry-core.
Preparing to unpack .../095-python3-poetry-core_1.9.0-2_all.deb ...
Unpacking python3-poetry-core (1.9.0-2) ...
Selecting previously unselected package python3-pytest.
Preparing to unpack .../096-python3-pytest_8.3.3-1_all.deb ...
Unpacking python3-pytest (8.3.3-1) ...
Selecting previously unselected package python3-pytest-asyncio.
Preparing to unpack .../097-python3-pytest-asyncio_0.24.0a1-1_all.deb ...
Unpacking python3-pytest-asyncio (0.24.0a1-1) ...
Selecting previously unselected package python3-pytest-cov.
Preparing to unpack .../098-python3-pytest-cov_5.0.0-1_all.deb ...
Unpacking python3-pytest-cov (5.0.0-1) ...
Selecting previously unselected package python3-syrupy.
Preparing to unpack .../099-python3-syrupy_4.7.2-1_all.deb ...
Unpacking python3-syrupy (4.7.2-1) ...
Selecting previously unselected package sbuild-build-depends-main-dummy.
Preparing to unpack .../100-sbuild-build-depends-main-dummy_0.invalid.0_arm64.deb ...
Unpacking sbuild-build-depends-main-dummy (0.invalid.0) ...
Setting up media-types (10.1.0) ...
Setting up libfile-stripnondeterminism-perl (1.14.0-1) ...
Setting up libtirpc-common (1.3.4+ds-1.3) ...
Setting up po-debconf (1.0.21+nmu1) ...
Setting up libdebhelper-perl (13.20) ...
Setting up linux-libc-dev (6.11.7-1) ...
Setting up m4 (1.4.19-4) ...
Setting up libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ...
Setting up libfakeroot:arm64 (1.36-1) ...
Setting up libelf1t64:arm64 (0.192-4) ...
Setting up fakeroot (1.36-1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
Setting up libpython3.13-minimal:arm64 (3.13.0-2) ...
Setting up autotools-dev (20220109.1) ...
Setting up rpcsvc-proto (1.4.3-1+b1) ...
Setting up libmpfr6:arm64 (4.2.1-1+b2) ...
Setting up libmpc3:arm64 (1.3.1-1+b3) ...
Setting up autopoint (0.22.5-2) ...
Setting up libncursesw6:arm64 (6.5-2+b1) ...
Setting up autoconf (2.72-3) ...
Setting up libubsan1:arm64 (14.2.0-8) ...
Setting up dh-strip-nondeterminism (1.14.0-1) ...
Setting up dwz (0.15-1+b1) ...
Setting up libhwasan0:arm64 (14.2.0-8) ...
Setting up libcrypt-dev:arm64 (1:4.4.36-5) ...
Setting up libasan8:arm64 (14.2.0-8) ...
Setting up python3.13-minimal (3.13.0-2) ...
Setting up libtsan2:arm64 (14.2.0-8) ...
Setting up libjs-jquery (3.6.1+dfsg+~3.5.14-1) ...
Setting up libjs-jquery-hotkeys (0~20130707+git2d51e3a9+dfsg-2.1) ...
Setting up libisl23:arm64 (0.27-1) ...
Setting up libc-dev-bin (2.40-3) ...
Setting up libpython3.13-stdlib:arm64 (3.13.0-2) ...
Setting up libcc1-0:arm64 (14.2.0-8) ...
Setting up libonig5:arm64 (6.9.9-1+b1) ...
Setting up liblsan0:arm64 (14.2.0-8) ...
Setting up libitm1:arm64 (14.2.0-8) ...
Setting up automake (1:1.16.5-1.3) ...
update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode
Setting up libtirpc3t64:arm64 (1.3.4+ds-1.3+b1) ...
Setting up python3.13 (3.13.0-2) ...
Setting up libjq1:arm64 (1.7.1-3+b1) ...
Setting up libjs-jquery-metadata (12-4) ...
Setting up libjs-jquery-isonscreen (1.2.0-1.1) ...
Setting up libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ...
Setting up cpp-14-aarch64-linux-gnu (14.2.0-8) ...
Setting up jq (1.7.1-3+b1) ...
Setting up libnsl2:arm64 (1.3.0-3+b3) ...
Setting up libc6-dev:arm64 (2.40-3) ...
Setting up libgcc-14-dev:arm64 (14.2.0-8) ...
Setting up libstdc++-14-dev:arm64 (14.2.0-8) ...
Setting up libpython3.12-stdlib:arm64 (3.12.7-3) ...
Setting up python3.12 (3.12.7-3) ...
Setting up cpp-aarch64-linux-gnu (4:14.2.0-1) ...
Setting up cpp-14 (14.2.0-8) ...
Setting up cpp (4:14.2.0-1) ...
Setting up gcc-14-aarch64-linux-gnu (14.2.0-8) ...
Setting up libpython3-stdlib:arm64 (3.12.7-1) ...
Setting up gcc-aarch64-linux-gnu (4:14.2.0-1) ...
Setting up g++-14-aarch64-linux-gnu (14.2.0-8) ...
Setting up python3 (3.12.7-1) ...
Setting up python3-zipp (3.21.0-1) ...
Setting up python3-autocommand (2.2.2-3) ...
Setting up python3-wheel (0.45.0-1) ...
Setting up python3-multidict (6.1.0-1+b1) ...
Setting up gcc-14 (14.2.0-8) ...
Setting up python3-frozenlist (1.5.0-1+b2) ...
Setting up python3-aiosignal (1.3.1-1) ...
Setting up python3-async-timeout (5.0.1-1) ...
Setting up python3-packaging (24.2-1) ...
Setting up python3-pyproject-hooks (1.2.0-1) ...
Setting up python3-poetry-core (1.9.0-2) ...
Setting up python3-idna (3.8-2) ...
Setting up python3-typing-extensions (4.12.2-2) ...
Setting up python3-aiohappyeyeballs (2.4.3-1) ...
Setting up python3-pip (24.3.1+dfsg-1) ...
Setting up python3-toml (0.10.2-1) ...
Setting up python3-installer (0.7.0+dfsg1-3) ...
Setting up python3-pluggy (1.5.0-1) ...
Setting up g++-aarch64-linux-gnu (4:14.2.0-1) ...
Setting up g++-14 (14.2.0-8) ...
Setting up python3-build (1.2.2-1) ...
Setting up python3-yarl (1.13.1-1+b1) ...
Setting up python3-more-itertools (10.5.0-1) ...
Setting up python3-iniconfig (1.1.1-2) ...
Setting up python3-attr (24.2.0-1) ...
Setting up python3-jaraco.functools (4.1.0-1) ...
Setting up python3-async-generator (1.10-4) ...
Setting up python3-jaraco.context (6.0.0-1) ...
Setting up libtool (2.4.7-8) ...
Setting up python3-pytest (8.3.3-1) ...
Setting up python3-syrupy (4.7.2-1) ...
Setting up python3-typeguard (4.4.1-1) ...
Setting up python3-aiohttp (3.10.10-2) ...
Setting up python3-all (3.12.7-1) ...
Setting up python3-coverage (7.6.0+dfsg1-2+b1) ...
Setting up python3-pytest-cov (5.0.0-1) ...
Setting up openstack-pkg-tools (130) ...
Setting up gcc (4:14.2.0-1) ...
Setting up dh-autoreconf (20) ...
Setting up python3-inflect (7.3.1-2) ...
Setting up python3-jaraco.text (4.0.0-1) ...
Setting up python3-pytest-asyncio (0.24.0a1-1) ...
Setting up g++ (4:14.2.0-1) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up build-essential (12.12) ...
Setting up python3-pkg-resources (75.2.0-1) ...
Setting up python3-aioresponses (0.7.6-2) ...
Setting up python3-setuptools (75.2.0-1) ...
Setting up python3-covdefaults (2.3.0-2) ...
Setting up debhelper (13.20) ...
Setting up dh-python (6.20241024) ...
Setting up pybuild-plugin-pyproject (6.20241024) ...
Setting up sbuild-build-depends-main-dummy (0.invalid.0) ...
Processing triggers for man-db (2.13.0-1) ...
Processing triggers for libc-bin (2.40-3) ...
+------------------------------------------------------------------------------+
| Check architectures |
+------------------------------------------------------------------------------+
Arch check ok (arm64 included in all)
+------------------------------------------------------------------------------+
| Build environment |
+------------------------------------------------------------------------------+
Kernel: Linux 6.1.0-27-cloud-arm64 #1 SMP Debian 6.1.115-1 (2024-11-01) arm64 (aarch64)
Toolchain package versions: binutils_2.43.1-5 dpkg-dev_1.22.12~1.gbp82cafd g++-14_14.2.0-8 gcc-14_14.2.0-8 libc6-dev_2.40-3 libstdc++-14-dev_14.2.0-8 libstdc++6_14.2.0-8 linux-libc-dev_6.11.7-1
Package versions: appstream_1.0.3-1+b1 apt_2.9.11 autoconf_2.72-3 automake_1:1.16.5-1.3 autopoint_0.22.5-2 autotools-dev_20220109.1 base-files_13.5 base-passwd_3.6.5 bash_5.2.32-1+b2 binutils_2.43.1-5 binutils-aarch64-linux-gnu_2.43.1-5 binutils-common_2.43.1-5 bsdextrautils_2.40.2-11 bsdutils_1:2.40.2-11 build-essential_12.12 bzip2_1.0.8-6 ca-certificates_20240203 coreutils_9.5-1+b1 cpp_4:14.2.0-1 cpp-14_14.2.0-8 cpp-14-aarch64-linux-gnu_14.2.0-8 cpp-aarch64-linux-gnu_4:14.2.0-1 dash_0.5.12-9+b1 debconf_1.5.87 debhelper_13.20 debian-archive-keyring_2023.4 debianutils_5.21 dh-autoreconf_20 dh-python_6.20241024 dh-strip-nondeterminism_1.14.0-1 diffstat_1.66-1+b1 diffutils_1:3.10-1+b1 dpkg_1.22.12~1.gbp82cafd dpkg-dev_1.22.12~1.gbp82cafd dwz_0.15-1+b1 e2fsprogs_1.47.1-1+b1 fakeroot_1.36-1 file_1:5.45-3+b1 findutils_4.10.0-3 g++_4:14.2.0-1 g++-14_14.2.0-8 g++-14-aarch64-linux-gnu_14.2.0-8 g++-aarch64-linux-gnu_4:14.2.0-1 gcc_4:14.2.0-1 gcc-14_14.2.0-8 gcc-14-aarch64-linux-gnu_14.2.0-8 gcc-14-base_14.2.0-8 gcc-aarch64-linux-gnu_4:14.2.0-1 gettext_0.22.5-2 gettext-base_0.22.5-2 gpg_2.2.45-2 gpgconf_2.2.45-2 gpgv_2.2.45-2 grep_3.11-4+b1 groff-base_1.23.0-5 gzip_1.12-1.1+b1 hostname_3.25 init-system-helpers_1.67 intltool-debian_0.35.0+20060710.6 iso-codes_4.17.0-1 jq_1.7.1-3+b1 libacl1_2.3.2-2+b1 libaliased-perl_0.34-3 libappstream5_1.0.3-1+b1 libapt-pkg-perl_0.1.40+b6 libapt-pkg6.0t64_2.9.11 libarchive-zip-perl_1.68-1 libasan8_14.2.0-8 libassuan9_3.0.1-2 libatomic1_14.2.0-8 libattr1_1:2.5.2-2 libaudit-common_1:4.0.2-2 libaudit1_1:4.0.2-2 libb-hooks-endofscope-perl_0.28-1 libb-hooks-op-check-perl_0.22-3+b2 libberkeleydb-perl_0.66-1 libbinutils_2.43.1-5 libblkid1_2.40.2-11 libbrotli1_1.1.0-2+b6 libbsd0_0.12.2-2 libbz2-1.0_1.0.8-6 libc-bin_2.40-3 libc-dev-bin_2.40-3 libc6_2.40-3 libc6-dev_2.40-3 libcap-ng0_0.8.5-3+b1 libcap2_1:2.66-5+b1 libcapture-tiny-perl_0.48-2 libcc1-0_14.2.0-8 libcgi-pm-perl_4.66-1 libclass-data-inheritable-perl_0.10-1 libclass-inspector-perl_1.36-3 libclass-method-modifiers-perl_2.15-1 libclass-xsaccessor-perl_1.19-4+b4 libclone-perl_0.47-1+b1 libcom-err2_1.47.1-1+b1 libconfig-tiny-perl_2.30-1 libconst-fast-perl_0.014-2 libcpanel-json-xs-perl_4.38-1+b1 libcrypt-dev_1:4.4.36-5 libcrypt1_1:4.4.36-5 libctf-nobfd0_2.43.1-5 libctf0_2.43.1-5 libcurl3t64-gnutls_8.11.0-1 libdata-dpath-perl_0.60-1 libdata-messagepack-perl_1.02-1+b4 libdata-optlist-perl_0.114-1 libdata-validate-domain-perl_0.15-1 libdata-validate-ip-perl_0.31-1 libdata-validate-uri-perl_0.07-3 libdb5.3t64_5.3.28+dfsg2-9 libdebconfclient0_0.273 libdebhelper-perl_13.20 libdevel-callchecker-perl_0.009-1+b1 libdevel-size-perl_0.84-1+b1 libdevel-stacktrace-perl_2.0500-1 libdpkg-perl_1.22.12~1.gbp82cafd libdynaloader-functions-perl_0.004-1 libelf1t64_0.192-4 libemail-address-xs-perl_1.05-1+b4 libencode-locale-perl_1.05-3 libexception-class-perl_1.45-1 libexpat1_2.6.4-1 libext2fs2t64_1.47.1-1+b1 libfakeroot_1.36-1 libffi8_3.4.6-1 libfile-basedir-perl_0.09-2 libfile-find-rule-perl_0.34-3 libfile-listing-perl_6.16-1 libfile-sharedir-perl_1.118-3 libfile-stripnondeterminism-perl_1.14.0-1 libfont-ttf-perl_1.06-2 libgcc-14-dev_14.2.0-8 libgcc-s1_14.2.0-8 libgcrypt20_1.11.0-6 libgdbm-compat4t64_1.24-2 libgdbm6t64_1.24-2 libglib2.0-0t64_2.82.2-3 libgmp10_2:6.3.0+dfsg-2+b2 libgnutls30t64_3.8.8-2 libgomp1_14.2.0-8 libgpg-error0_1.50-4 libgprofng0_2.43.1-5 libgssapi-krb5-2_1.21.3-3 libhogweed6t64_3.10-1+b1 libhtml-form-perl_6.12-1 libhtml-html5-entities-perl_0.004-3 libhtml-parser-perl_3.83-1+b1 libhtml-tagset-perl_3.24-1 libhtml-tokeparser-simple-perl_3.16-4 libhtml-tree-perl_5.07-3 libhttp-cookies-perl_6.11-1 libhttp-date-perl_6.06-1 libhttp-message-perl_7.00-2 libhttp-negotiate-perl_6.01-2 libhwasan0_14.2.0-8 libicu72_72.1-5+b1 libidn2-0_2.3.7-2+b1 libimport-into-perl_1.002005-2 libio-html-perl_1.004-3 libio-interactive-perl_1.025-1 libio-socket-ssl-perl_2.089-1 libio-string-perl_1.08-4 libipc-run3-perl_0.049-1 libipc-system-simple-perl_1.30-2 libisl23_0.27-1 libiterator-perl_0.03+ds1-2 libiterator-util-perl_0.02+ds1-2 libitm1_14.2.0-8 libjansson4_2.14-2+b3 libjq1_1.7.1-3+b1 libjs-jquery_3.6.1+dfsg+~3.5.14-1 libjs-jquery-hotkeys_0~20130707+git2d51e3a9+dfsg-2.1 libjs-jquery-isonscreen_1.2.0-1.1 libjs-jquery-metadata_12-4 libjs-jquery-tablesorter_1:2.31.3+dfsg1-4 libjs-jquery-throttle-debounce_1.1+dfsg.1-2 libjson-maybexs-perl_1.004008-1 libk5crypto3_1.21.3-3 libkeyutils1_1.6.3-4 libkrb5-3_1.21.3-3 libkrb5support0_1.21.3-3 libldap-2.5-0_2.5.18+dfsg-3+b1 liblist-compare-perl_0.55-2 liblist-someutils-perl_0.59-1 liblist-utilsby-perl_0.12-2 liblsan0_14.2.0-8 liblwp-mediatypes-perl_6.04-2 liblwp-protocol-https-perl_6.14-1 liblz1_1.15~pre2-1 liblz4-1_1.9.4-3+b1 liblzma5_5.6.3-1+b1 liblzo2-2_2.10-3+b1 libmagic-mgc_1:5.45-3+b1 libmagic1t64_1:5.45-3+b1 libmarkdown2_2.2.7-2.1 libmd0_1.1.0-2+b1 libmldbm-perl_2.05-4 libmodule-implementation-perl_0.09-2 libmodule-runtime-perl_0.016-2 libmoo-perl_2.005005-1 libmoox-aliases-perl_0.001006-2 libmount1_2.40.2-11 libmouse-perl_2.5.11-1+b1 libmpc3_1.3.1-1+b3 libmpfr6_4.2.1-1+b2 libnamespace-clean-perl_0.27-2 libncursesw6_6.5-2+b1 libnet-domain-tld-perl_1.75-4 libnet-http-perl_6.23-1 libnet-ipv6addr-perl_1.02-1 libnet-netmask-perl_2.0002-2 libnet-ssleay-perl_1.94-2 libnetaddr-ip-perl_4.079+dfsg-2+b4 libnettle8t64_3.10-1+b1 libnghttp2-14_1.64.0-1 libnghttp3-9_1.4.0-1+b1 libngtcp2-16_1.6.0-1 libngtcp2-crypto-gnutls8_1.6.0-1 libnsl2_1.3.0-3+b3 libnumber-compare-perl_0.03-3 libonig5_6.9.9-1+b1 libp11-kit0_0.25.5-2+b1 libpackage-stash-perl_0.40-1 libpam-modules_1.5.3-7+b1 libpam-modules-bin_1.5.3-7+b1 libpam-runtime_1.5.3-7 libpam0g_1.5.3-7+b1 libparams-classify-perl_0.015-2+b4 libparams-util-perl_1.102-3+b1 libpath-tiny-perl_0.146-1 libpcre2-8-0_10.44-4 libperl5.40_5.40.0-7 libperlio-gzip-perl_0.20-1+b4 libperlio-utf8-strict-perl_0.010-1+b3 libpipeline1_1.5.8-1 libproc-processtable-perl_0.636-1+b3 libpsl5t64_0.21.2-1.1+b1 libpython3-stdlib_3.12.7-1 libpython3.12-minimal_3.12.7-3 libpython3.12-stdlib_3.12.7-3 libpython3.13-minimal_3.13.0-2 libpython3.13-stdlib_3.13.0-2 libreadline8t64_8.2-5 libregexp-wildcards-perl_1.05-3 librole-tiny-perl_2.002004-1 librtmp1_2.4+20151223.gitfa8646d.1-2+b5 libsasl2-2_2.1.28+dfsg1-8 libsasl2-modules-db_2.1.28+dfsg1-8 libseccomp2_2.5.5-1+b3 libselinux1_3.7-3+b1 libsemanage-common_3.7-2 libsemanage2_3.7-2+b1 libsepol2_3.7-1 libsereal-decoder-perl_5.004+ds-1+b3 libsereal-encoder-perl_5.004+ds-1+b3 libsframe1_2.43.1-5 libsmartcols1_2.40.2-11 libsort-versions-perl_1.62-3 libsqlite3-0_3.46.1-1 libss2_1.47.1-1+b1 libssh2-1t64_1.11.1-1 libssl3t64_3.3.2-2 libstdc++-14-dev_14.2.0-8 libstdc++6_14.2.0-8 libstemmer0d_2.2.0-4+b2 libstrictures-perl_2.000006-1 libsub-exporter-perl_0.990-1 libsub-exporter-progressive-perl_0.001013-3 libsub-identify-perl_0.14-3+b3 libsub-install-perl_0.929-1 libsub-name-perl_0.27-1+b3 libsub-quote-perl_2.006008-1 libsyntax-keyword-try-perl_0.30-1+b1 libsystemd0_257~rc2-3 libtasn1-6_4.19.0-3+b3 libterm-readkey-perl_2.38-2+b4 libtext-glob-perl_0.11-3 libtext-levenshteinxs-perl_0.03-5+b4 libtext-markdown-discount-perl_0.16-1+b3 libtext-xslate-perl_3.5.9-2+b1 libtime-duration-perl_1.21-2 libtime-moment-perl_0.44-2+b4 libtimedate-perl_2.3300-2 libtinfo6_6.5-2+b1 libtirpc-common_1.3.4+ds-1.3 libtirpc3t64_1.3.4+ds-1.3+b1 libtool_2.4.7-8 libtry-tiny-perl_0.32-1 libtsan2_14.2.0-8 libubsan1_14.2.0-8 libuchardet0_0.0.8-1+b2 libudev1_257~rc2-3 libunicode-utf8-perl_0.62-2+b3 libunistring5_1.2-1+b1 liburi-perl_5.30-1 libuuid1_2.40.2-11 libvariable-magic-perl_0.64-1+b1 libwww-mechanize-perl_2.19-1 libwww-perl_6.77-1 libwww-robotrules-perl_6.02-1 libxml-libxml-perl_2.0207+dfsg+really+2.0134-5+b1 libxml-namespacesupport-perl_1.12-2 libxml-sax-base-perl_1.09-3 libxml-sax-perl_1.02+dfsg-3 libxml2_2.12.7+dfsg+really2.9.14-0.2+b1 libxmlb2_0.3.21-1 libxs-parse-keyword-perl_0.46-1+b1 libxxhash0_0.8.2-2+b2 libyaml-0-2_0.2.5-1+b2 libyaml-libyaml-perl_0.902.0+ds-2+b1 libzstd1_1.5.6+dfsg-1+b1 lintian_2.120.0 linux-libc-dev_6.11.7-1 login_1:4.16.0-2+really2.40.2-11 login.defs_1:4.16.0-5 logsave_1.47.1-1+b1 lzop_1.04-2+b1 m4_1.4.19-4 make_4.3-4.1+b1 man-db_2.13.0-1 mawk_1.3.4.20240905-1 media-types_10.1.0 mount_2.40.2-11 ncurses-base_6.5-2 ncurses-bin_6.5-2+b1 netbase_6.4 openssl_3.3.2-2 openssl-provider-legacy_3.3.2-2 openstack-pkg-tools_130 passwd_1:4.16.0-5 patch_2.7.6-7+b1 patchutils_0.4.2-1+b1 perl_5.40.0-7 perl-base_5.40.0-7 perl-modules-5.40_5.40.0-7 perl-openssl-defaults_7+b2 plzip_1.11-2 po-debconf_1.0.21+nmu1 pybuild-plugin-pyproject_6.20241024 python3_3.12.7-1 python3-aiohappyeyeballs_2.4.3-1 python3-aiohttp_3.10.10-2 python3-aioresponses_0.7.6-2 python3-aiosignal_1.3.1-1 python3-all_3.12.7-1 python3-async-generator_1.10-4 python3-async-timeout_5.0.1-1 python3-attr_24.2.0-1 python3-autocommand_2.2.2-3 python3-build_1.2.2-1 python3-covdefaults_2.3.0-2 python3-coverage_7.6.0+dfsg1-2+b1 python3-frozenlist_1.5.0-1+b2 python3-idna_3.8-2 python3-inflect_7.3.1-2 python3-iniconfig_1.1.1-2 python3-installer_0.7.0+dfsg1-3 python3-jaraco.context_6.0.0-1 python3-jaraco.functools_4.1.0-1 python3-jaraco.text_4.0.0-1 python3-minimal_3.12.7-1 python3-more-itertools_10.5.0-1 python3-multidict_6.1.0-1+b1 python3-packaging_24.2-1 python3-pip_24.3.1+dfsg-1 python3-pkg-resources_75.2.0-1 python3-pluggy_1.5.0-1 python3-poetry-core_1.9.0-2 python3-pyproject-hooks_1.2.0-1 python3-pytest_8.3.3-1 python3-pytest-asyncio_0.24.0a1-1 python3-pytest-cov_5.0.0-1 python3-setuptools_75.2.0-1 python3-syrupy_4.7.2-1 python3-toml_0.10.2-1 python3-typeguard_4.4.1-1 python3-typing-extensions_4.12.2-2 python3-wheel_0.45.0-1 python3-yarl_1.13.1-1+b1 python3-zipp_3.21.0-1 python3.12_3.12.7-3 python3.12-minimal_3.12.7-3 python3.13_3.13.0-2 python3.13-minimal_3.13.0-2 readline-common_8.2-5 rpcsvc-proto_1.4.3-1+b1 sbuild-build-depends-main-dummy_0.invalid.0 sed_4.9-2+b1 sensible-utils_0.0.24 shared-mime-info_2.4-5+b1 sysvinit-utils_3.11-1 t1utils_1.41-4+b1 tar_1.35+dfsg-3+b1 tzdata_2024b-3 ucf_3.0043+nmu1 unzip_6.0-28+b1 util-linux_2.40.2-11 xz-utils_5.6.3-1+b1 zlib1g_1:1.3.dfsg+really1.3.1-1+b1
+------------------------------------------------------------------------------+
| Build |
+------------------------------------------------------------------------------+
Unpack source
-------------
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 3.0 (quilt)
Source: python-aiowithings
Binary: python3-aiowithings
Architecture: all
Version: 3.0.3-2
Maintainer: Home Assistant Team <team+homeassistant@tracker.debian.org>
Uploaders: Thomas Goirand <zigo@debian.org>,
Homepage: https://github.com/joostlek/python-withings
Standards-Version: 4.6.1
Vcs-Browser: https://salsa.debian.org/homeassistant-team/deps/python-aiowithings
Vcs-Git: https://salsa.debian.org/homeassistant-team/deps/python-aiowithings.git
Testsuite: autopkgtest
Testsuite-Triggers: @builddeps@, pybuild-plugin-autopkgtest
Build-Depends: debhelper-compat (= 11), dh-python, openstack-pkg-tools, pybuild-plugin-pyproject, python3-all, python3-poetry-core, python3-setuptools
Build-Depends-Indep: python3-aiohttp, python3-aioresponses, python3-covdefaults, python3-pytest, python3-pytest-asyncio, python3-pytest-cov, python3-syrupy, python3-yarl
Package-List:
python3-aiowithings deb python optional arch=all
Checksums-Sha1:
0e74278ec22da473425c3b3910116906b18cec68 305648 python-aiowithings_3.0.3.orig.tar.xz
ca2133f6c856653c6c5abdc894164bbba38abf31 2072 python-aiowithings_3.0.3-2.debian.tar.xz
Checksums-Sha256:
8a815b385fedd83860aa60c1ccc0c4cb8356f2962177058b9271c27f5faaafaf 305648 python-aiowithings_3.0.3.orig.tar.xz
da36b0d4751b70e444f87d7d5c49365b8dd70349d2dcea30add426fc30f7ba00 2072 python-aiowithings_3.0.3-2.debian.tar.xz
Files:
5d0c865116140056edfbd5a9a36aac56 305648 python-aiowithings_3.0.3.orig.tar.xz
1acfd5862c8fb15c792119454c29882d 2072 python-aiowithings_3.0.3-2.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEoLGp81CJVhMOekJc1BatFaxrQ/4FAmbctvYACgkQ1BatFaxr
Q/6uvw/7BOEMM8MZHCWJ9nOPoQZHZJLnBFpoBG/GrC6sAlYepARdkubJYY0kt235
rDH/RFY93ymJQ9Cnw/C23BSEYjib5prNPkHWF+8nMl5CcMKk8PmW6t3ouLqDlY3I
4NTP5FXfQZPvUFy1IT7MIF1yPZXF3Z2Mh8xL1XciyyfGnk5QhW6nnB1t0HyKlWz7
7ehyag6X4gbYHTEnRNxcFAhPWsx9h68h9CY8INDAtGT5yy772uOjzuQ4kXONBPS+
JZi8ljRqJt3Vl5K2lo/IpY1ak0EFN5WSwqqhxr2AbaUoKtht1puSFX7lfPiHaMnC
7uUjH8uJRIX0RRMjJKMZkiQxRdlQIPdCUxbzWJusJVfzTHW4M81psDl+VlFfhR7q
eMGZLZ4dX0RoWfyjYieWNc+22+hgr6fsfTC+z/7gkx5E0NbxhkkBhXbNkc1Z6eht
qJYId0TcOPGH95N1e/G5KhOBWOa2PLg8cuOeIU9/bq/1o1KN140YTLRW8vELChV2
QQHO3rIENBd2Nrh9jfnm3CQ9mQjJGc8XlvvC1K+Do7d+eqvXkCYqCMrzhE7uAQ6a
I3jqwssfRiY1NjZ7APSsLDOVtFv5PksQYY0GwCZwdzmyNET0orJQsCZlq7sN2Tuz
vFSJvNWbOxl+ibjEOZy2musAdyT3SankJH6XHNLhQnBSOjMC2Og=
=M5vw
-----END PGP SIGNATURE-----
gpgv: Signature made Sat Sep 7 20:26:30 2024 UTC
gpgv: using RSA key A0B1A9F3508956130E7A425CD416AD15AC6B43FE
gpgv: Can't check signature: No public key
dpkg-source: warning: cannot verify inline signature for ./python-aiowithings_3.0.3-2.dsc: no acceptable signature found
dpkg-source: info: extracting python-aiowithings in /<<PKGBUILDDIR>>
dpkg-source: info: unpacking python-aiowithings_3.0.3.orig.tar.xz
dpkg-source: info: unpacking python-aiowithings_3.0.3-2.debian.tar.xz
Check disk space
----------------
Sufficient free space for build
User Environment
----------------
APT_CONFIG=/var/lib/sbuild/apt.conf
HOME=/sbuild-nonexistent
LANG=en_US.UTF-8
LC_ALL=C.UTF-8
LOGNAME=debusine-worker
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
SHELL=/bin/sh
USER=debusine-worker
dpkg-buildpackage
-----------------
Command: dpkg-buildpackage -us -uc -b -rfakeroot
dpkg-buildpackage: info: source package python-aiowithings
dpkg-buildpackage: info: source version 3.0.3-2
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Thomas Goirand <zigo@debian.org>
dpkg-source --before-build .
dpkg-buildpackage: info: host architecture arm64
dpkg-source: info: using options from python-aiowithings-3.0.3/debian/source/options: --extend-diff-ignore=^[^/]*[.]egg-info/
debian/rules clean
make: pyversions: No such file or directory
py3versions: no X-Python3-Version in control file, using supported versions
dh clean --buildsystem=pybuild --with python3
dh_auto_clean -O--buildsystem=pybuild
dh_autoreconf_clean -O--buildsystem=pybuild
dh_clean -O--buildsystem=pybuild
debian/rules binary
make: pyversions: No such file or directory
py3versions: no X-Python3-Version in control file, using supported versions
dh binary --buildsystem=pybuild --with python3
dh_update_autotools_config -O--buildsystem=pybuild
dh_autoreconf -O--buildsystem=pybuild
dh_auto_configure -O--buildsystem=pybuild
dh_auto_build -O--buildsystem=pybuild
I: pybuild plugin_pyproject:129: Building wheel for python3.13 with "build" module
I: pybuild base:311: python3.13 -m build --skip-dependency-check --no-isolation --wheel --outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13
* Building wheel...
Successfully built aiowithings-2.1.0-py3-none-any.whl
I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.13 with "installer" module
I: pybuild plugin_pyproject:129: Building wheel for python3.12 with "build" module
I: pybuild base:311: python3.12 -m build --skip-dependency-check --no-isolation --wheel --outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12
* Building wheel...
Successfully built aiowithings-2.1.0-py3-none-any.whl
I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.12 with "installer" module
dh_auto_test -O--buildsystem=pybuild
I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build; python3.13 -m pytest -v tests
/usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
============================= test session starts ==============================
platform linux -- Python 3.13.0, pytest-8.3.3, pluggy-1.5.0 -- /usr/bin/python3.13
cachedir: .pytest_cache
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build
configfile: pyproject.toml
plugins: asyncio-0.24.0a1, syrupy-4.7.2, cov-5.0.0, typeguard-4.4.1
asyncio: mode=Mode.AUTO, default_loop_scope=None
collecting ... collected 60 items
tests/test_helpers.py::test_aggregate_measurements PASSED [ 1%]
tests/test_helpers.py::test_aggregate_positional_measurements PASSED [ 3%]
tests/test_helpers.py::test_aggregate_sleep_summary PASSED [ 5%]
tests/test_helpers.py::test_aggregate_single_sleep_summary PASSED [ 6%]
tests/test_helpers.py::test_aggregate_no_sleep_summary PASSED [ 8%]
tests/test_models.py::test_measurement_parsing[measurement_list.json] PASSED [ 10%]
tests/test_models.py::test_measurement_parsing[measurement_list_2.json] PASSED [ 11%]
tests/test_util.py::test_measurement PASSED [ 13%]
tests/test_util.py::test_measurement_from_dict PASSED [ 15%]
tests/test_withings.py::test_putting_in_own_session FAILED [ 16%]
tests/test_withings.py::test_creating_own_session FAILED [ 18%]
tests/test_withings.py::test_refresh_token PASSED [ 20%]
tests/test_withings.py::test_unexpected_server_response FAILED [ 21%]
tests/test_withings.py::test_timeout FAILED [ 23%]
tests/test_withings.py::test_error_codes[100-WithingsAuthenticationFailedError] FAILED [ 25%]
tests/test_withings.py::test_error_codes[201-WithingsInvalidParamsError] FAILED [ 26%]
tests/test_withings.py::test_error_codes[214-WithingsUnauthorizedError] FAILED [ 28%]
tests/test_withings.py::test_error_codes[215-WithingsErrorOccurredError] FAILED [ 30%]
tests/test_withings.py::test_error_codes[522-WithingsConnectionError] FAILED [ 31%]
tests/test_withings.py::test_error_codes[524-WithingsBadStateError] FAILED [ 33%]
tests/test_withings.py::test_error_codes[601-WithingsTooManyRequestsError] FAILED [ 35%]
tests/test_withings.py::test_error_codes[-1-WithingsUnknownStatusError] FAILED [ 36%]
tests/test_withings.py::test_error_codes[None-WithingsUnknownStatusError] FAILED [ 38%]
tests/test_withings.py::test_get_activities_since FAILED [ 40%]
tests/test_withings.py::test_get_activities_period FAILED [ 41%]
tests/test_withings.py::test_get_devices FAILED [ 43%]
tests/test_withings.py::test_get_new_device FAILED [ 45%]
tests/test_withings.py::test_get_goals[goals] FAILED [ 46%]
tests/test_withings.py::test_get_goals[goals_1] FAILED [ 48%]
tests/test_withings.py::test_get_goals[goals_2] FAILED [ 50%]
tests/test_withings.py::test_get_goals[no_goals] FAILED [ 51%]
tests/test_withings.py::test_get_measurement_since FAILED [ 53%]
tests/test_withings.py::test_get_measurement_period FAILED [ 55%]
tests/test_withings.py::test_subscribing FAILED [ 56%]
tests/test_withings.py::test_revoking FAILED [ 58%]
tests/test_withings.py::test_list_subscriptions FAILED [ 60%]
tests/test_withings.py::test_list_all_subscriptions FAILED [ 61%]
tests/test_withings.py::test_measurement_points_to_get[UNKNOWN] PASSED [ 63%]
tests/test_withings.py::test_measurement_points_to_get[WEIGHT] PASSED [ 65%]
tests/test_withings.py::test_measurement_points_to_get[TEMPERATURE] PASSED [ 66%]
tests/test_withings.py::test_measurement_points_to_get[PRESSURE] PASSED [ 68%]
tests/test_withings.py::test_measurement_points_to_get[ACTIVITY] PASSED [ 70%]
tests/test_withings.py::test_measurement_points_to_get[SLEEP] PASSED [ 71%]
tests/test_withings.py::test_measurement_points_to_get[USER_DATA] PASSED [ 73%]
tests/test_withings.py::test_measurement_points_to_get[IN_BED] PASSED [ 75%]
tests/test_withings.py::test_measurement_points_to_get[OUT_BED] PASSED [ 76%]
tests/test_withings.py::test_measurement_points_to_get[INITIAL_INFLATION_DONE] PASSED [ 78%]
tests/test_withings.py::test_measurement_points_to_get[NO_ACCOUNT_ASSOCIATED] PASSED [ 80%]
tests/test_withings.py::test_measurement_points_to_get[ECG] PASSED [ 81%]
tests/test_withings.py::test_measurement_points_to_get[ECG_FAILED] PASSED [ 83%]
tests/test_withings.py::test_measurement_points_to_get[GLUCOSE] PASSED [ 85%]
tests/test_withings.py::test_webhook_object PASSED [ 86%]
tests/test_withings.py::test_get_sleep FAILED [ 88%]
tests/test_withings.py::test_get_sleep_without_data_fields FAILED [ 90%]
tests/test_withings.py::test_get_sleep_summary_in_period FAILED [ 91%]
tests/test_withings.py::test_get_sleep_summary_in_period_without_data_fields FAILED [ 93%]
tests/test_withings.py::test_get_sleep_summary_since FAILED [ 95%]
tests/test_withings.py::test_get_sleep_summary_since_without_data_fields FAILED [ 96%]
tests/test_withings.py::test_get_workouts_since FAILED [ 98%]
tests/test_withings.py::test_get_workouts_period FAILED [100%]
=================================== FAILURES ===================================
_________________________ test_putting_in_own_session __________________________
responses = <aioresponses.core.aioresponses object at 0xffff8b1ac980>
async def test_putting_in_own_session(
responses: aioresponses,
) -> None:
"""Test putting in own session."""
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=load_fixture("device.json"),
)
async with aiohttp.ClientSession() as session:
withings = WithingsClient(session=session)
withings.authenticate("test")
> await withings.get_devices()
tests/test_withings.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b1ac980>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b1ae120>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
__________________________ test_creating_own_session ___________________________
responses = <aioresponses.core.aioresponses object at 0xffff8b142990>
async def test_creating_own_session(
responses: aioresponses,
) -> None:
"""Test creating own session."""
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=load_fixture("device.json"),
)
withings = WithingsClient()
withings.authenticate("test")
> await withings.get_devices()
tests/test_withings.py:73:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b142990>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b142850>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_______________________ test_unexpected_server_response ________________________
responses = <aioresponses.core.aioresponses object at 0xffff8b141590>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b143ed0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_unexpected_server_response(
responses: aioresponses,
authenticated_client: WithingsClient,
) -> None:
"""Test handling unexpected response."""
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
headers={"Content-Type": "plain/text"},
body="Yes",
)
with pytest.raises(WithingsError):
> assert await authenticated_client.get_devices()
tests/test_withings.py:109:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b141590>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b143ed0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_________________________________ test_timeout _________________________________
responses = <aioresponses.core.aioresponses object at 0xffff8b14aea0>
async def test_timeout(
responses: aioresponses,
) -> None:
"""Test request timeout."""
# Faking a timeout by sleeping
async def response_handler(_: str, **_kwargs: Any) -> CallbackResult:
"""Response handler for this test."""
await asyncio.sleep(2)
return CallbackResult(body="Goodmorning!")
responses.post(
f"{WITHINGS_URL}/v2/user",
callback=response_handler,
)
async with WithingsClient(request_timeout=1) as withings:
with pytest.raises(WithingsConnectionError):
> assert await withings.get_devices()
tests/test_withings.py:129:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b14aea0>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b14b5c0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer None', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer None'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
___________ test_error_codes[100-WithingsAuthenticationFailedError] ____________
responses = <aioresponses.core.aioresponses object at 0xffff8b14b6f0>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b2042b0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
status = 100
error = <class 'aiowithings.exceptions.WithingsAuthenticationFailedError'>
@pytest.mark.parametrize(
("status", "error"),
[
(100, WithingsAuthenticationFailedError),
(201, WithingsInvalidParamsError),
(214, WithingsUnauthorizedError),
(215, WithingsErrorOccurredError),
(522, WithingsConnectionError),
(524, WithingsBadStateError),
(601, WithingsTooManyRequestsError),
(-1, WithingsUnknownStatusError),
(None, WithingsUnknownStatusError),
],
)
async def test_error_codes(
responses: aioresponses,
authenticated_client: WithingsClient,
status: int | None,
error: type[Exception],
) -> None:
"""Test error codes from withings."""
response_data = json.loads(load_fixture("device.json"))
response_data["status"] = status
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=json.dumps(response_data),
)
with pytest.raises(error):
> assert await authenticated_client.get_devices()
tests/test_withings.py:162:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b14b6f0>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b2042b0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_______________ test_error_codes[201-WithingsInvalidParamsError] _______________
responses = <aioresponses.core.aioresponses object at 0xffff8b12d7f0>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b12d130>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
status = 201
error = <class 'aiowithings.exceptions.WithingsInvalidParamsError'>
@pytest.mark.parametrize(
("status", "error"),
[
(100, WithingsAuthenticationFailedError),
(201, WithingsInvalidParamsError),
(214, WithingsUnauthorizedError),
(215, WithingsErrorOccurredError),
(522, WithingsConnectionError),
(524, WithingsBadStateError),
(601, WithingsTooManyRequestsError),
(-1, WithingsUnknownStatusError),
(None, WithingsUnknownStatusError),
],
)
async def test_error_codes(
responses: aioresponses,
authenticated_client: WithingsClient,
status: int | None,
error: type[Exception],
) -> None:
"""Test error codes from withings."""
response_data = json.loads(load_fixture("device.json"))
response_data["status"] = status
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=json.dumps(response_data),
)
with pytest.raises(error):
> assert await authenticated_client.get_devices()
tests/test_withings.py:162:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b12d7f0>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b12d130>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_______________ test_error_codes[214-WithingsUnauthorizedError] ________________
responses = <aioresponses.core.aioresponses object at 0xffff8b192be0>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b192f10>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
status = 214, error = <class 'aiowithings.exceptions.WithingsUnauthorizedError'>
@pytest.mark.parametrize(
("status", "error"),
[
(100, WithingsAuthenticationFailedError),
(201, WithingsInvalidParamsError),
(214, WithingsUnauthorizedError),
(215, WithingsErrorOccurredError),
(522, WithingsConnectionError),
(524, WithingsBadStateError),
(601, WithingsTooManyRequestsError),
(-1, WithingsUnknownStatusError),
(None, WithingsUnknownStatusError),
],
)
async def test_error_codes(
responses: aioresponses,
authenticated_client: WithingsClient,
status: int | None,
error: type[Exception],
) -> None:
"""Test error codes from withings."""
response_data = json.loads(load_fixture("device.json"))
response_data["status"] = status
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=json.dumps(response_data),
)
with pytest.raises(error):
> assert await authenticated_client.get_devices()
tests/test_withings.py:162:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b192be0>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b192f10>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_______________ test_error_codes[215-WithingsErrorOccurredError] _______________
responses = <aioresponses.core.aioresponses object at 0xffff8b193130>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b184050>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
status = 215
error = <class 'aiowithings.exceptions.WithingsErrorOccurredError'>
@pytest.mark.parametrize(
("status", "error"),
[
(100, WithingsAuthenticationFailedError),
(201, WithingsInvalidParamsError),
(214, WithingsUnauthorizedError),
(215, WithingsErrorOccurredError),
(522, WithingsConnectionError),
(524, WithingsBadStateError),
(601, WithingsTooManyRequestsError),
(-1, WithingsUnknownStatusError),
(None, WithingsUnknownStatusError),
],
)
async def test_error_codes(
responses: aioresponses,
authenticated_client: WithingsClient,
status: int | None,
error: type[Exception],
) -> None:
"""Test error codes from withings."""
response_data = json.loads(load_fixture("device.json"))
response_data["status"] = status
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=json.dumps(response_data),
)
with pytest.raises(error):
> assert await authenticated_client.get_devices()
tests/test_withings.py:162:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b193130>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b184050>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
________________ test_error_codes[522-WithingsConnectionError] _________________
responses = <aioresponses.core.aioresponses object at 0xffff8b11f950>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b1929c0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
status = 522, error = <class 'aiowithings.exceptions.WithingsConnectionError'>
@pytest.mark.parametrize(
("status", "error"),
[
(100, WithingsAuthenticationFailedError),
(201, WithingsInvalidParamsError),
(214, WithingsUnauthorizedError),
(215, WithingsErrorOccurredError),
(522, WithingsConnectionError),
(524, WithingsBadStateError),
(601, WithingsTooManyRequestsError),
(-1, WithingsUnknownStatusError),
(None, WithingsUnknownStatusError),
],
)
async def test_error_codes(
responses: aioresponses,
authenticated_client: WithingsClient,
status: int | None,
error: type[Exception],
) -> None:
"""Test error codes from withings."""
response_data = json.loads(load_fixture("device.json"))
response_data["status"] = status
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=json.dumps(response_data),
)
with pytest.raises(error):
> assert await authenticated_client.get_devices()
tests/test_withings.py:162:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b11f950>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b1929c0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_________________ test_error_codes[524-WithingsBadStateError] __________________
responses = <aioresponses.core.aioresponses object at 0xffff8b05c650>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b191f20>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
status = 524, error = <class 'aiowithings.exceptions.WithingsBadStateError'>
@pytest.mark.parametrize(
("status", "error"),
[
(100, WithingsAuthenticationFailedError),
(201, WithingsInvalidParamsError),
(214, WithingsUnauthorizedError),
(215, WithingsErrorOccurredError),
(522, WithingsConnectionError),
(524, WithingsBadStateError),
(601, WithingsTooManyRequestsError),
(-1, WithingsUnknownStatusError),
(None, WithingsUnknownStatusError),
],
)
async def test_error_codes(
responses: aioresponses,
authenticated_client: WithingsClient,
status: int | None,
error: type[Exception],
) -> None:
"""Test error codes from withings."""
response_data = json.loads(load_fixture("device.json"))
response_data["status"] = status
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=json.dumps(response_data),
)
with pytest.raises(error):
> assert await authenticated_client.get_devices()
tests/test_withings.py:162:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b05c650>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b191f20>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
______________ test_error_codes[601-WithingsTooManyRequestsError] ______________
responses = <aioresponses.core.aioresponses object at 0xffff8acb3b60>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b1847c0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
status = 601
error = <class 'aiowithings.exceptions.WithingsTooManyRequestsError'>
@pytest.mark.parametrize(
("status", "error"),
[
(100, WithingsAuthenticationFailedError),
(201, WithingsInvalidParamsError),
(214, WithingsUnauthorizedError),
(215, WithingsErrorOccurredError),
(522, WithingsConnectionError),
(524, WithingsBadStateError),
(601, WithingsTooManyRequestsError),
(-1, WithingsUnknownStatusError),
(None, WithingsUnknownStatusError),
],
)
async def test_error_codes(
responses: aioresponses,
authenticated_client: WithingsClient,
status: int | None,
error: type[Exception],
) -> None:
"""Test error codes from withings."""
response_data = json.loads(load_fixture("device.json"))
response_data["status"] = status
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=json.dumps(response_data),
)
with pytest.raises(error):
> assert await authenticated_client.get_devices()
tests/test_withings.py:162:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8acb3b60>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b1847c0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_______________ test_error_codes[-1-WithingsUnknownStatusError] ________________
responses = <aioresponses.core.aioresponses object at 0xffff8acb2030>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b192cf0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
status = -1, error = <class 'aiowithings.exceptions.WithingsUnknownStatusError'>
@pytest.mark.parametrize(
("status", "error"),
[
(100, WithingsAuthenticationFailedError),
(201, WithingsInvalidParamsError),
(214, WithingsUnauthorizedError),
(215, WithingsErrorOccurredError),
(522, WithingsConnectionError),
(524, WithingsBadStateError),
(601, WithingsTooManyRequestsError),
(-1, WithingsUnknownStatusError),
(None, WithingsUnknownStatusError),
],
)
async def test_error_codes(
responses: aioresponses,
authenticated_client: WithingsClient,
status: int | None,
error: type[Exception],
) -> None:
"""Test error codes from withings."""
response_data = json.loads(load_fixture("device.json"))
response_data["status"] = status
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=json.dumps(response_data),
)
with pytest.raises(error):
> assert await authenticated_client.get_devices()
tests/test_withings.py:162:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8acb2030>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b192cf0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
______________ test_error_codes[None-WithingsUnknownStatusError] _______________
responses = <aioresponses.core.aioresponses object at 0xffff8b1e9e10>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b1928b0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
status = None
error = <class 'aiowithings.exceptions.WithingsUnknownStatusError'>
@pytest.mark.parametrize(
("status", "error"),
[
(100, WithingsAuthenticationFailedError),
(201, WithingsInvalidParamsError),
(214, WithingsUnauthorizedError),
(215, WithingsErrorOccurredError),
(522, WithingsConnectionError),
(524, WithingsBadStateError),
(601, WithingsTooManyRequestsError),
(-1, WithingsUnknownStatusError),
(None, WithingsUnknownStatusError),
],
)
async def test_error_codes(
responses: aioresponses,
authenticated_client: WithingsClient,
status: int | None,
error: type[Exception],
) -> None:
"""Test error codes from withings."""
response_data = json.loads(load_fixture("device.json"))
response_data["status"] = status
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=json.dumps(response_data),
)
with pytest.raises(error):
> assert await authenticated_client.get_devices()
tests/test_withings.py:162:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b1e9e10>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b1928b0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
__________________________ test_get_activities_since ___________________________
responses = <aioresponses.core.aioresponses object at 0xffff8b1eba10>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b185480>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_activities_since(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving activities."""
responses.post(
f"{WITHINGS_URL}/v2/measure",
status=200,
body=load_fixture("activity.json"),
)
> response = await authenticated_client.get_activities_since(
datetime.fromtimestamp(1609559200, tz=timezone.utc),
activity_data_fields=[ActivityDataFields.DISTANCE],
)
tests/test_withings.py:176:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:290: in get_activities_since
return await self._get_activities(
aiowithings/withings.py:278: in _get_activities
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b1eba10>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b185480>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/measure'), args = ()
kwargs = {'data': {'action': 'getactivity', 'data_fields': 'distance', 'lastupdate': 1609559200}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/measure')
url_str = 'https://wbsapi.withings.net/v2/measure'
key = ('POST', URL('https://wbsapi.withings.net/v2/measure'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...st'}, 'data': {'lastupdate': 1609559200, 'action': 'getactivity', 'data_fields': 'distance'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/measure
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
__________________________ test_get_activities_period __________________________
responses = <aioresponses.core.aioresponses object at 0xffff8b3dac30>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b1929c0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_activities_period(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving activities."""
responses.post(
f"{WITHINGS_URL}/v2/measure",
status=200,
body=load_fixture("activity.json"),
)
> response = await authenticated_client.get_activities_in_period(
start_date=datetime.fromtimestamp(1609459200, tz=timezone.utc),
end_date=datetime.fromtimestamp(1609559200, tz=timezone.utc),
)
tests/test_withings.py:204:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:302: in get_activities_in_period
return await self._get_activities(
aiowithings/withings.py:278: in _get_activities
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b3dac30>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b1929c0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/measure'), args = ()
kwargs = {'data': {'action': 'getactivity', 'enddateymd': '2021-01-02 03:46:40+00:00', 'startdateymd': '2021-01-01 00:00:00+00:...s': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/measure')
url_str = 'https://wbsapi.withings.net/v2/measure'
key = ('POST', URL('https://wbsapi.withings.net/v2/measure'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...1-01-01 00:00:00+00:00', 'enddateymd': '2021-01-02 03:46:40+00:00', 'action': 'getactivity'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/measure
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_______________________________ test_get_devices _______________________________
responses = <aioresponses.core.aioresponses object at 0xffff8b1e0710>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b1918c0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_devices(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving devices."""
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=load_fixture("device.json"),
)
> response = await authenticated_client.get_devices()
tests/test_withings.py:232:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b1e0710>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b1918c0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_____________________________ test_get_new_device ______________________________
responses = <aioresponses.core.aioresponses object at 0xffff8b1e0ad0>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b185bf0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
caplog = <_pytest.logging.LogCaptureFixture object at 0xffff8b1ae7b0>
async def test_get_new_device(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
caplog: pytest.LogCaptureFixture,
) -> None:
"""Test retrieving devices that aren't known yet."""
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=load_fixture("new_device.json"),
)
> response = await authenticated_client.get_devices()
tests/test_withings.py:254:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b1e0ad0>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b185bf0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
____________________________ test_get_goals[goals] _____________________________
responses = <aioresponses.core.aioresponses object at 0xffff8bba94f0>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b1938a0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
fixture = 'goals'
@pytest.mark.parametrize(
"fixture",
[
"goals",
"goals_1",
"goals_2",
"no_goals",
],
)
async def test_get_goals(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
fixture: str,
) -> None:
"""Test retrieving goals."""
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=load_fixture(f"{fixture}.json"),
)
> response = await authenticated_client.get_goals()
tests/test_withings.py:288:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:156: in get_goals
response = await self._request("v2/user", data={"action": "getgoals"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8bba94f0>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b1938a0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getgoals'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getgoals'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
___________________________ test_get_goals[goals_1] ____________________________
responses = <aioresponses.core.aioresponses object at 0xffff8bba9230>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b191e10>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
fixture = 'goals_1'
@pytest.mark.parametrize(
"fixture",
[
"goals",
"goals_1",
"goals_2",
"no_goals",
],
)
async def test_get_goals(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
fixture: str,
) -> None:
"""Test retrieving goals."""
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=load_fixture(f"{fixture}.json"),
)
> response = await authenticated_client.get_goals()
tests/test_withings.py:288:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:156: in get_goals
response = await self._request("v2/user", data={"action": "getgoals"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8bba9230>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b191e10>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getgoals'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getgoals'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
___________________________ test_get_goals[goals_2] ____________________________
responses = <aioresponses.core.aioresponses object at 0xffff8b18f4d0>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b192360>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
fixture = 'goals_2'
@pytest.mark.parametrize(
"fixture",
[
"goals",
"goals_1",
"goals_2",
"no_goals",
],
)
async def test_get_goals(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
fixture: str,
) -> None:
"""Test retrieving goals."""
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=load_fixture(f"{fixture}.json"),
)
> response = await authenticated_client.get_goals()
tests/test_withings.py:288:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:156: in get_goals
response = await self._request("v2/user", data={"action": "getgoals"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b18f4d0>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b192360>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getgoals'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getgoals'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
___________________________ test_get_goals[no_goals] ___________________________
responses = <aioresponses.core.aioresponses object at 0xffff8b133570>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b193020>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
fixture = 'no_goals'
@pytest.mark.parametrize(
"fixture",
[
"goals",
"goals_1",
"goals_2",
"no_goals",
],
)
async def test_get_goals(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
fixture: str,
) -> None:
"""Test retrieving goals."""
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=load_fixture(f"{fixture}.json"),
)
> response = await authenticated_client.get_goals()
tests/test_withings.py:288:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:156: in get_goals
response = await self._request("v2/user", data={"action": "getgoals"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b133570>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b193020>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getgoals'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getgoals'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
__________________________ test_get_measurement_since __________________________
responses = <aioresponses.core.aioresponses object at 0xffff8b547da0>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b1938a0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_measurement_since(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving measurements."""
responses.post(
f"{WITHINGS_URL}/measure",
status=200,
body=load_fixture("measurement.json"),
)
> response = await authenticated_client.get_measurement_since(
datetime.fromtimestamp(1609459200, tz=timezone.utc),
measurement_types=[MeasurementType.WEIGHT],
)
tests/test_withings.py:309:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:181: in get_measurement_since
return await self._get_measurements(
aiowithings/withings.py:169: in _get_measurements
response = await self._request("measure", data=data)
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b547da0>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b1938a0>
method = 'POST', url = URL('https://wbsapi.withings.net/measure'), args = ()
kwargs = {'data': {'action': 'getmeas', 'lastupdate': 1609459200, 'meastypes': '1'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/measure')
url_str = 'https://wbsapi.withings.net/measure'
key = ('POST', URL('https://wbsapi.withings.net/measure'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...': 'Bearer test'}, 'data': {'lastupdate': 1609459200, 'action': 'getmeas', 'meastypes': '1'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/measure
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_________________________ test_get_measurement_period __________________________
responses = <aioresponses.core.aioresponses object at 0xffff8adb30d0>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b193350>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_measurement_period(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving measurements."""
responses.post(
f"{WITHINGS_URL}/measure",
status=200,
body=load_fixture("measurement.json"),
)
> response = await authenticated_client.get_measurement_in_period(
start_date=datetime.fromtimestamp(1609459200, tz=timezone.utc),
end_date=datetime.fromtimestamp(1609559200, tz=timezone.utc),
)
tests/test_withings.py:333:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:193: in get_measurement_in_period
return await self._get_measurements(
aiowithings/withings.py:169: in _get_measurements
response = await self._request("measure", data=data)
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8adb30d0>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b193350>
method = 'POST', url = URL('https://wbsapi.withings.net/measure'), args = ()
kwargs = {'data': {'action': 'getmeas', 'enddate': 1609559200, 'startdate': 1609459200}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/measure')
url_str = 'https://wbsapi.withings.net/measure'
key = ('POST', URL('https://wbsapi.withings.net/measure'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...Bearer test'}, 'data': {'startdate': 1609459200, 'enddate': 1609559200, 'action': 'getmeas'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/measure
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_______________________________ test_subscribing _______________________________
responses = <aioresponses.core.aioresponses object at 0xffff8b0756d0>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b193130>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_subscribing(
responses: aioresponses,
authenticated_client: WithingsClient,
) -> None:
"""Test subscribing to webhook updates."""
responses.post(
f"{WITHINGS_URL}/notify",
status=200,
body=load_fixture("notify_subscribe.json"),
)
> await authenticated_client.subscribe_notification(
"https://test.com/callback",
NotificationCategory.PRESSURE,
)
tests/test_withings.py:356:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:352: in subscribe_notification
await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b0756d0>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b193130>
method = 'POST', url = URL('https://wbsapi.withings.net/notify'), args = ()
kwargs = {'data': {'action': 'subscribe', 'appli': <NotificationCategory.PRESSURE: 4>, 'callbackurl': 'https://test.com/callbac...s': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/notify')
url_str = 'https://wbsapi.withings.net/notify'
key = ('POST', URL('https://wbsapi.withings.net/notify'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...e', 'callbackurl': 'https://test.com/callback', 'appli': <NotificationCategory.PRESSURE: 4>}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/notify
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
________________________________ test_revoking _________________________________
responses = <aioresponses.core.aioresponses object at 0xffff8b3510d0>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b192e00>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_revoking(
responses: aioresponses,
authenticated_client: WithingsClient,
) -> None:
"""Test subscribing to webhook updates."""
responses.post(
f"{WITHINGS_URL}/notify",
status=200,
body=load_fixture("notify_revoke.json"),
)
> await authenticated_client.revoke_notification_configurations(
"https://test.com/callback",
NotificationCategory.PRESSURE,
)
tests/test_withings.py:382:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:386: in revoke_notification_configurations
await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b3510d0>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b192e00>
method = 'POST', url = URL('https://wbsapi.withings.net/notify'), args = ()
kwargs = {'data': {'action': 'revoke', 'appli': <NotificationCategory.PRESSURE: 4>, 'callbackurl': 'https://test.com/callback'}...s': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/notify')
url_str = 'https://wbsapi.withings.net/notify'
key = ('POST', URL('https://wbsapi.withings.net/notify'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...e', 'callbackurl': 'https://test.com/callback', 'appli': <NotificationCategory.PRESSURE: 4>}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/notify
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
___________________________ test_list_subscriptions ____________________________
responses = <aioresponses.core.aioresponses object at 0xffff8b1de950>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b1918c0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_list_subscriptions(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving subscriptions."""
responses.post(
f"{WITHINGS_URL}/notify",
status=200,
body=load_fixture("notify_list.json"),
)
> response = await authenticated_client.list_notification_configurations(
NotificationCategory.WEIGHT,
)
tests/test_withings.py:409:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:371: in list_notification_configurations
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b1de950>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b1918c0>
method = 'POST', url = URL('https://wbsapi.withings.net/notify'), args = ()
kwargs = {'data': {'action': 'list', 'appli': <NotificationCategory.WEIGHT: 1>}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/notify')
url_str = 'https://wbsapi.withings.net/notify'
key = ('POST', URL('https://wbsapi.withings.net/notify'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...tion': 'Bearer test'}, 'data': {'action': 'list', 'appli': <NotificationCategory.WEIGHT: 1>}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/notify
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_________________________ test_list_all_subscriptions __________________________
responses = <aioresponses.core.aioresponses object at 0xffff8b02a350>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b193df0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_list_all_subscriptions(
responses: aioresponses,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving all subscriptions."""
responses.post(
f"{WITHINGS_URL}/notify",
status=200,
body=load_fixture("notify_list.json"),
)
> response = await authenticated_client.list_notification_configurations()
tests/test_withings.py:431:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:371: in list_notification_configurations
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b02a350>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b193df0>
method = 'POST', url = URL('https://wbsapi.withings.net/notify'), args = ()
kwargs = {'data': {'action': 'list'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/notify')
url_str = 'https://wbsapi.withings.net/notify'
key = ('POST', URL('https://wbsapi.withings.net/notify'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'list'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/notify
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
________________________________ test_get_sleep ________________________________
responses = <aioresponses.core.aioresponses object at 0xffff8b1dfbd0>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b191f20>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_sleep(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving sleep."""
responses.post(
f"{WITHINGS_URL}/v2/sleep",
status=200,
body=load_fixture("sleep.json"),
)
> response = await authenticated_client.get_sleep(
datetime.fromtimestamp(0, tz=timezone.utc),
datetime.fromtimestamp(1609559200, tz=timezone.utc),
[
SleepDataFields.HEART_RATE,
SleepDataFields.RESPIRATION_RATE,
SleepDataFields.SNORING,
SleepDataFields.HEART_RATE_VARIABILITY,
SleepDataFields.HEART_RATE_VARIABILITY_2,
SleepDataFields.MOVEMENT_SCORE,
],
)
tests/test_withings.py:479:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:217: in get_sleep
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b1dfbd0>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b191f20>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/sleep'), args = ()
kwargs = {'data': {'action': 'get', 'data_fields': 'hr,rr,snoring,sdnn_1,rmssd,mvt_score', 'enddate': 1609559200, 'startdate': ...s': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/sleep')
url_str = 'https://wbsapi.withings.net/v2/sleep'
key = ('POST', URL('https://wbsapi.withings.net/v2/sleep'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...startdate': 0, 'enddate': 1609559200, 'data_fields': 'hr,rr,snoring,sdnn_1,rmssd,mvt_score'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/sleep
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
______________________ test_get_sleep_without_data_fields ______________________
responses = <aioresponses.core.aioresponses object at 0xffff8b1a7c50>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b184f30>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_sleep_without_data_fields(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving sleep without datafields."""
responses.post(
f"{WITHINGS_URL}/v2/sleep",
status=200,
body=load_fixture("sleep_no_datafields.json"),
)
> response = await authenticated_client.get_sleep(
datetime.fromtimestamp(0, tz=timezone.utc),
datetime.fromtimestamp(1609559200, tz=timezone.utc),
)
tests/test_withings.py:516:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:217: in get_sleep
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b1a7c50>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b184f30>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/sleep'), args = ()
kwargs = {'data': {'action': 'get', 'enddate': 1609559200, 'startdate': 0}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/sleep')
url_str = 'https://wbsapi.withings.net/v2/sleep'
key = ('POST', URL('https://wbsapi.withings.net/v2/sleep'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...orization': 'Bearer test'}, 'data': {'action': 'get', 'startdate': 0, 'enddate': 1609559200}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/sleep
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_______________________ test_get_sleep_summary_in_period _______________________
responses = <aioresponses.core.aioresponses object at 0xffff8b1de550>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b193130>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_sleep_summary_in_period(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving sleep."""
responses.post(
f"{WITHINGS_URL}/v2/sleep",
status=200,
body=load_fixture("sleep_summary.json"),
)
> response = await authenticated_client.get_sleep_summary_in_period(
start_date=datetime.fromtimestamp(0, tz=timezone.utc).date(),
end_date=datetime.fromtimestamp(1609559200, tz=timezone.utc).date(),
sleep_summary_data_fields=[
SleepSummaryDataFields.REM_SLEEP_PHASE_COUNT,
SleepSummaryDataFields.SLEEP_EFFICIENCY,
SleepSummaryDataFields.SLEEP_LATENCY,
SleepSummaryDataFields.TOTAL_SLEEP_TIME,
SleepSummaryDataFields.TOTAL_TIME_IN_BED,
SleepSummaryDataFields.WAKE_UP_LATENCY,
SleepSummaryDataFields.TIME_AWAKE_DURING_SLEEP,
SleepSummaryDataFields.APNEA_HYPOPNEA_INDEX,
SleepSummaryDataFields.BREATHING_DISTURBANCES_INTENSITY,
SleepSummaryDataFields.EXTERNAL_TOTAL_SLEEP_TIME,
SleepSummaryDataFields.DEEP_SLEEP_DURATION,
SleepSummaryDataFields.AVERAGE_HEART_RATE,
SleepSummaryDataFields.MIN_HEART_RATE,
SleepSummaryDataFields.MAX_HEART_RATE,
SleepSummaryDataFields.LIGHT_SLEEP_DURATION,
SleepSummaryDataFields.ACTIVE_MOVEMENT_DURATION,
SleepSummaryDataFields.AVERAGE_MOVEMENT_SCORE,
SleepSummaryDataFields.NIGHT_EVENTS,
SleepSummaryDataFields.OUT_OF_BED_COUNT,
SleepSummaryDataFields.REM_SLEEP_DURATION,
SleepSummaryDataFields.AVERAGE_RESPIRATION_RATE,
SleepSummaryDataFields.MIN_RESPIRATION_RATE,
SleepSummaryDataFields.MAX_RESPIRATION_RATE,
SleepSummaryDataFields.SLEEP_SCORE,
SleepSummaryDataFields.SNORING,
SleepSummaryDataFields.SNORING_COUNT,
SleepSummaryDataFields.WAKE_UP_COUNT,
SleepSummaryDataFields.TOTAL_TIME_AWAKE,
SleepSummaryDataFields.WITHINGS_INDEX,
],
)
tests/test_withings.py:540:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:260: in get_sleep_summary_in_period
return await self._get_sleep_summary(
aiowithings/withings.py:236: in _get_sleep_summary
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b1de550>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b193130>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/sleep'), args = ()
kwargs = {'data': {'action': 'getsummary', 'data_fields': 'nb_rem_episodes,sleep_efficiency,sleep_latency,total_sleep_time,tota...s': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/sleep')
url_str = 'https://wbsapi.withings.net/v2/sleep'
key = ('POST', URL('https://wbsapi.withings.net/v2/sleep'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...n,rr_max,sleep_score,snoring,snoringepisodecount,wakeupcount,wakeupduration,withings_index'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/sleep
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_____________ test_get_sleep_summary_in_period_without_data_fields _____________
responses = <aioresponses.core.aioresponses object at 0xffff8adb06d0>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b193df0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_sleep_summary_in_period_without_data_fields(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving sleep without datafields."""
responses.post(
f"{WITHINGS_URL}/v2/sleep",
status=200,
body=load_fixture("sleep_summary_no_datafields.json"),
)
> response = await authenticated_client.get_sleep_summary_in_period(
start_date=datetime.fromtimestamp(0, tz=timezone.utc).date(),
end_date=datetime.fromtimestamp(1609559200, tz=timezone.utc).date(),
)
tests/test_withings.py:606:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:260: in get_sleep_summary_in_period
return await self._get_sleep_summary(
aiowithings/withings.py:236: in _get_sleep_summary
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8adb06d0>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b193df0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/sleep'), args = ()
kwargs = {'data': {'action': 'getsummary', 'enddateymd': '2021-01-02', 'startdateymd': '1970-01-01'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/sleep')
url_str = 'https://wbsapi.withings.net/v2/sleep'
key = ('POST', URL('https://wbsapi.withings.net/v2/sleep'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *..., 'data': {'startdateymd': '1970-01-01', 'enddateymd': '2021-01-02', 'action': 'getsummary'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/sleep
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_________________________ test_get_sleep_summary_since _________________________
responses = <aioresponses.core.aioresponses object at 0xffff8b3aaad0>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b1846b0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_sleep_summary_since(
responses: aioresponses,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving sleep."""
responses.post(
f"{WITHINGS_URL}/v2/sleep",
status=200,
body=load_fixture("sleep_summary.json"),
)
> response = await authenticated_client.get_sleep_summary_since(
sleep_summary_since=datetime.fromtimestamp(0, tz=timezone.utc),
sleep_summary_data_fields=[
SleepSummaryDataFields.REM_SLEEP_PHASE_COUNT,
SleepSummaryDataFields.SLEEP_EFFICIENCY,
SleepSummaryDataFields.SLEEP_LATENCY,
SleepSummaryDataFields.TOTAL_SLEEP_TIME,
SleepSummaryDataFields.TOTAL_TIME_IN_BED,
SleepSummaryDataFields.WAKE_UP_LATENCY,
SleepSummaryDataFields.TIME_AWAKE_DURING_SLEEP,
SleepSummaryDataFields.APNEA_HYPOPNEA_INDEX,
SleepSummaryDataFields.BREATHING_DISTURBANCES_INTENSITY,
SleepSummaryDataFields.EXTERNAL_TOTAL_SLEEP_TIME,
SleepSummaryDataFields.DEEP_SLEEP_DURATION,
SleepSummaryDataFields.AVERAGE_HEART_RATE,
SleepSummaryDataFields.MIN_HEART_RATE,
SleepSummaryDataFields.MAX_HEART_RATE,
SleepSummaryDataFields.LIGHT_SLEEP_DURATION,
SleepSummaryDataFields.ACTIVE_MOVEMENT_DURATION,
SleepSummaryDataFields.AVERAGE_MOVEMENT_SCORE,
SleepSummaryDataFields.NIGHT_EVENTS,
SleepSummaryDataFields.OUT_OF_BED_COUNT,
SleepSummaryDataFields.REM_SLEEP_DURATION,
SleepSummaryDataFields.AVERAGE_RESPIRATION_RATE,
SleepSummaryDataFields.MIN_RESPIRATION_RATE,
SleepSummaryDataFields.MAX_RESPIRATION_RATE,
SleepSummaryDataFields.SLEEP_SCORE,
SleepSummaryDataFields.SNORING,
SleepSummaryDataFields.SNORING_COUNT,
SleepSummaryDataFields.WAKE_UP_COUNT,
SleepSummaryDataFields.TOTAL_TIME_AWAKE,
SleepSummaryDataFields.WITHINGS_INDEX,
],
)
tests/test_withings.py:633:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:248: in get_sleep_summary_since
return await self._get_sleep_summary(
aiowithings/withings.py:236: in _get_sleep_summary
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b3aaad0>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b1846b0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/sleep'), args = ()
kwargs = {'data': {'action': 'getsummary', 'data_fields': 'nb_rem_episodes,sleep_efficiency,sleep_latency,total_sleep_time,tota...s': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/sleep')
url_str = 'https://wbsapi.withings.net/v2/sleep'
key = ('POST', URL('https://wbsapi.withings.net/v2/sleep'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...n,rr_max,sleep_score,snoring,snoringepisodecount,wakeupcount,wakeupduration,withings_index'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/sleep
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_______________ test_get_sleep_summary_since_without_data_fields _______________
responses = <aioresponses.core.aioresponses object at 0xffff8aeabd50>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b190270>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_sleep_summary_since_without_data_fields(
responses: aioresponses,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving sleep without datafields."""
responses.post(
f"{WITHINGS_URL}/v2/sleep",
status=200,
body=load_fixture("sleep_summary_no_datafields.json"),
)
> response = await authenticated_client.get_sleep_summary_since(
datetime.fromtimestamp(0, tz=timezone.utc),
)
tests/test_withings.py:696:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:248: in get_sleep_summary_since
return await self._get_sleep_summary(
aiowithings/withings.py:236: in _get_sleep_summary
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8aeabd50>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b190270>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/sleep'), args = ()
kwargs = {'data': {'action': 'getsummary', 'lastupdate': 0}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/sleep')
url_str = 'https://wbsapi.withings.net/v2/sleep'
key = ('POST', URL('https://wbsapi.withings.net/v2/sleep'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'lastupdate': 0, 'action': 'getsummary'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/sleep
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
___________________________ test_get_workouts_since ____________________________
responses = <aioresponses.core.aioresponses object at 0xffff8b1de550>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b184160>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_workouts_since(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving workouts."""
responses.post(
f"{WITHINGS_URL}/v2/measure",
status=200,
body=load_fixture("workouts.json"),
)
> response = await authenticated_client.get_workouts_since(
datetime.fromtimestamp(0, tz=timezone.utc),
workout_data_fields=[WorkoutDataFields.CALORIES],
)
tests/test_withings.py:722:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:329: in get_workouts_since
return await self._get_workouts(
aiowithings/withings.py:317: in _get_workouts
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b1de550>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b184160>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/measure'), args = ()
kwargs = {'data': {'action': 'getworkouts', 'data_fields': 'calories', 'lastupdate': 0}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/measure')
url_str = 'https://wbsapi.withings.net/v2/measure'
key = ('POST', URL('https://wbsapi.withings.net/v2/measure'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...Bearer test'}, 'data': {'lastupdate': 0, 'action': 'getworkouts', 'data_fields': 'calories'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/measure
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
___________________________ test_get_workouts_period ___________________________
responses = <aioresponses.core.aioresponses object at 0xffff8b3f3dd0>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffff8b185d00>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_workouts_period(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving workouts."""
responses.post(
f"{WITHINGS_URL}/v2/measure",
status=200,
body=load_fixture("workouts.json"),
)
> response = await authenticated_client.get_workouts_in_period(
start_date=datetime.fromtimestamp(0, tz=timezone.utc),
end_date=datetime.fromtimestamp(1609559200, tz=timezone.utc),
)
tests/test_withings.py:746:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:341: in get_workouts_in_period
return await self._get_workouts(
aiowithings/withings.py:317: in _get_workouts
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
<string>:3: in _request
???
/usr/lib/python3.13/unittest/mock.py:2321: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffff8b3f3dd0>
orig_self = <aiohttp.client.ClientSession object at 0xffff8b185d00>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/measure'), args = ()
kwargs = {'data': {'action': 'getworkouts', 'enddateymd': '2021-01-02 03:46:40+00:00', 'startdateymd': '1970-01-01 00:00:00+00:...s': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/measure')
url_str = 'https://wbsapi.withings.net/v2/measure'
key = ('POST', URL('https://wbsapi.withings.net/v2/measure'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...0-01-01 00:00:00+00:00', 'enddateymd': '2021-01-02 03:46:40+00:00', 'action': 'getworkouts'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/measure
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
---------- coverage: platform linux, python 3.13.0-final-0 -----------
Name Stmts Miss Branch BrPart Cover Missing
---------------------------------------------------------------------
aiowithings/models.py 563 79 94 0 82% 115-127, 149-154, 407, 450, 463-465, 516, 720-736, 876-926
aiowithings/util.py 16 3 0 0 81% 20-26
aiowithings/withings.py 132 35 40 1 69% 115-147, 152, 157, 170, 221, 240, 282, 321, 375
---------------------------------------------------------------------
TOTAL 761 117 152 1 81%
4 files skipped due to complete coverage.
FAIL Required test coverage of 100% not reached. Total coverage: 80.72%
--------------------------- snapshot report summary ----------------------------
22 snapshots passed. 17 snapshots unused.
Re-run pytest with --snapshot-update to delete unused snapshots.
=========================== short test summary info ============================
FAILED tests/test_withings.py::test_putting_in_own_session - aiohttp.client_e...
FAILED tests/test_withings.py::test_creating_own_session - aiohttp.client_exc...
FAILED tests/test_withings.py::test_unexpected_server_response - aiohttp.clie...
FAILED tests/test_withings.py::test_timeout - aiohttp.client_exceptions.Clien...
FAILED tests/test_withings.py::test_error_codes[100-WithingsAuthenticationFailedError]
FAILED tests/test_withings.py::test_error_codes[201-WithingsInvalidParamsError]
FAILED tests/test_withings.py::test_error_codes[214-WithingsUnauthorizedError]
FAILED tests/test_withings.py::test_error_codes[215-WithingsErrorOccurredError]
FAILED tests/test_withings.py::test_error_codes[522-WithingsConnectionError]
FAILED tests/test_withings.py::test_error_codes[524-WithingsBadStateError] - ...
FAILED tests/test_withings.py::test_error_codes[601-WithingsTooManyRequestsError]
FAILED tests/test_withings.py::test_error_codes[-1-WithingsUnknownStatusError]
FAILED tests/test_withings.py::test_error_codes[None-WithingsUnknownStatusError]
FAILED tests/test_withings.py::test_get_activities_since - aiohttp.client_exc...
FAILED tests/test_withings.py::test_get_activities_period - aiohttp.client_ex...
FAILED tests/test_withings.py::test_get_devices - aiohttp.client_exceptions.C...
FAILED tests/test_withings.py::test_get_new_device - aiohttp.client_exception...
FAILED tests/test_withings.py::test_get_goals[goals] - aiohttp.client_excepti...
FAILED tests/test_withings.py::test_get_goals[goals_1] - aiohttp.client_excep...
FAILED tests/test_withings.py::test_get_goals[goals_2] - aiohttp.client_excep...
FAILED tests/test_withings.py::test_get_goals[no_goals] - aiohttp.client_exce...
FAILED tests/test_withings.py::test_get_measurement_since - aiohttp.client_ex...
FAILED tests/test_withings.py::test_get_measurement_period - aiohttp.client_e...
FAILED tests/test_withings.py::test_subscribing - aiohttp.client_exceptions.C...
FAILED tests/test_withings.py::test_revoking - aiohttp.client_exceptions.Clie...
FAILED tests/test_withings.py::test_list_subscriptions - aiohttp.client_excep...
FAILED tests/test_withings.py::test_list_all_subscriptions - aiohttp.client_e...
FAILED tests/test_withings.py::test_get_sleep - aiohttp.client_exceptions.Cli...
FAILED tests/test_withings.py::test_get_sleep_without_data_fields - aiohttp.c...
FAILED tests/test_withings.py::test_get_sleep_summary_in_period - aiohttp.cli...
FAILED tests/test_withings.py::test_get_sleep_summary_in_period_without_data_fields
FAILED tests/test_withings.py::test_get_sleep_summary_since - aiohttp.client_...
FAILED tests/test_withings.py::test_get_sleep_summary_since_without_data_fields
FAILED tests/test_withings.py::test_get_workouts_since - aiohttp.client_excep...
FAILED tests/test_withings.py::test_get_workouts_period - aiohttp.client_exce...
======================== 35 failed, 25 passed in 7.53s =========================
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build; python3.13 -m pytest -v tests
I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build; python3.12 -m pytest -v tests
/usr/lib/python3/dist-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
============================= test session starts ==============================
platform linux -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0 -- /usr/bin/python3.12
cachedir: .pytest_cache
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build
configfile: pyproject.toml
plugins: asyncio-0.24.0a1, syrupy-4.7.2, cov-5.0.0, typeguard-4.4.1
asyncio: mode=Mode.AUTO, default_loop_scope=None
collecting ... collected 60 items
tests/test_helpers.py::test_aggregate_measurements PASSED [ 1%]
tests/test_helpers.py::test_aggregate_positional_measurements PASSED [ 3%]
tests/test_helpers.py::test_aggregate_sleep_summary PASSED [ 5%]
tests/test_helpers.py::test_aggregate_single_sleep_summary PASSED [ 6%]
tests/test_helpers.py::test_aggregate_no_sleep_summary PASSED [ 8%]
tests/test_models.py::test_measurement_parsing[measurement_list.json] PASSED [ 10%]
tests/test_models.py::test_measurement_parsing[measurement_list_2.json] PASSED [ 11%]
tests/test_util.py::test_measurement PASSED [ 13%]
tests/test_util.py::test_measurement_from_dict PASSED [ 15%]
tests/test_withings.py::test_putting_in_own_session FAILED [ 16%]
tests/test_withings.py::test_creating_own_session FAILED [ 18%]
tests/test_withings.py::test_refresh_token PASSED [ 20%]
tests/test_withings.py::test_unexpected_server_response FAILED [ 21%]
tests/test_withings.py::test_timeout FAILED [ 23%]
tests/test_withings.py::test_error_codes[100-WithingsAuthenticationFailedError] FAILED [ 25%]
tests/test_withings.py::test_error_codes[201-WithingsInvalidParamsError] FAILED [ 26%]
tests/test_withings.py::test_error_codes[214-WithingsUnauthorizedError] FAILED [ 28%]
tests/test_withings.py::test_error_codes[215-WithingsErrorOccurredError] FAILED [ 30%]
tests/test_withings.py::test_error_codes[522-WithingsConnectionError] FAILED [ 31%]
tests/test_withings.py::test_error_codes[524-WithingsBadStateError] FAILED [ 33%]
tests/test_withings.py::test_error_codes[601-WithingsTooManyRequestsError] FAILED [ 35%]
tests/test_withings.py::test_error_codes[-1-WithingsUnknownStatusError] FAILED [ 36%]
tests/test_withings.py::test_error_codes[None-WithingsUnknownStatusError] FAILED [ 38%]
tests/test_withings.py::test_get_activities_since FAILED [ 40%]
tests/test_withings.py::test_get_activities_period FAILED [ 41%]
tests/test_withings.py::test_get_devices FAILED [ 43%]
tests/test_withings.py::test_get_new_device FAILED [ 45%]
tests/test_withings.py::test_get_goals[goals] FAILED [ 46%]
tests/test_withings.py::test_get_goals[goals_1] FAILED [ 48%]
tests/test_withings.py::test_get_goals[goals_2] FAILED [ 50%]
tests/test_withings.py::test_get_goals[no_goals] FAILED [ 51%]
tests/test_withings.py::test_get_measurement_since FAILED [ 53%]
tests/test_withings.py::test_get_measurement_period FAILED [ 55%]
tests/test_withings.py::test_subscribing FAILED [ 56%]
tests/test_withings.py::test_revoking FAILED [ 58%]
tests/test_withings.py::test_list_subscriptions FAILED [ 60%]
tests/test_withings.py::test_list_all_subscriptions FAILED [ 61%]
tests/test_withings.py::test_measurement_points_to_get[UNKNOWN] PASSED [ 63%]
tests/test_withings.py::test_measurement_points_to_get[WEIGHT] PASSED [ 65%]
tests/test_withings.py::test_measurement_points_to_get[TEMPERATURE] PASSED [ 66%]
tests/test_withings.py::test_measurement_points_to_get[PRESSURE] PASSED [ 68%]
tests/test_withings.py::test_measurement_points_to_get[ACTIVITY] PASSED [ 70%]
tests/test_withings.py::test_measurement_points_to_get[SLEEP] PASSED [ 71%]
tests/test_withings.py::test_measurement_points_to_get[USER_DATA] PASSED [ 73%]
tests/test_withings.py::test_measurement_points_to_get[IN_BED] PASSED [ 75%]
tests/test_withings.py::test_measurement_points_to_get[OUT_BED] PASSED [ 76%]
tests/test_withings.py::test_measurement_points_to_get[INITIAL_INFLATION_DONE] PASSED [ 78%]
tests/test_withings.py::test_measurement_points_to_get[NO_ACCOUNT_ASSOCIATED] PASSED [ 80%]
tests/test_withings.py::test_measurement_points_to_get[ECG] PASSED [ 81%]
tests/test_withings.py::test_measurement_points_to_get[ECG_FAILED] PASSED [ 83%]
tests/test_withings.py::test_measurement_points_to_get[GLUCOSE] PASSED [ 85%]
tests/test_withings.py::test_webhook_object PASSED [ 86%]
tests/test_withings.py::test_get_sleep FAILED [ 88%]
tests/test_withings.py::test_get_sleep_without_data_fields FAILED [ 90%]
tests/test_withings.py::test_get_sleep_summary_in_period FAILED [ 91%]
tests/test_withings.py::test_get_sleep_summary_in_period_without_data_fields FAILED [ 93%]
tests/test_withings.py::test_get_sleep_summary_since FAILED [ 95%]
tests/test_withings.py::test_get_sleep_summary_since_without_data_fields FAILED [ 96%]
tests/test_withings.py::test_get_workouts_since FAILED [ 98%]
tests/test_withings.py::test_get_workouts_period FAILED [100%]
=================================== FAILURES ===================================
_________________________ test_putting_in_own_session __________________________
responses = <aioresponses.core.aioresponses object at 0xffffb5e80650>
async def test_putting_in_own_session(
responses: aioresponses,
) -> None:
"""Test putting in own session."""
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=load_fixture("device.json"),
)
async with aiohttp.ClientSession() as session:
withings = WithingsClient(session=session)
withings.authenticate("test")
> await withings.get_devices()
tests/test_withings.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5e80650>
orig_self = <aiohttp.client.ClientSession object at 0xffffb64bb770>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
__________________________ test_creating_own_session ___________________________
responses = <aioresponses.core.aioresponses object at 0xffffb5e83e60>
async def test_creating_own_session(
responses: aioresponses,
) -> None:
"""Test creating own session."""
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=load_fixture("device.json"),
)
withings = WithingsClient()
withings.authenticate("test")
> await withings.get_devices()
tests/test_withings.py:73:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5e83e60>
orig_self = <aiohttp.client.ClientSession object at 0xffffb624cfe0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_______________________ test_unexpected_server_response ________________________
responses = <aioresponses.core.aioresponses object at 0xffffb5e804d0>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb5e80260>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_unexpected_server_response(
responses: aioresponses,
authenticated_client: WithingsClient,
) -> None:
"""Test handling unexpected response."""
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
headers={"Content-Type": "plain/text"},
body="Yes",
)
with pytest.raises(WithingsError):
> assert await authenticated_client.get_devices()
tests/test_withings.py:109:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5e804d0>
orig_self = <aiohttp.client.ClientSession object at 0xffffb5e80260>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_________________________________ test_timeout _________________________________
responses = <aioresponses.core.aioresponses object at 0xffffb624e9f0>
async def test_timeout(
responses: aioresponses,
) -> None:
"""Test request timeout."""
# Faking a timeout by sleeping
async def response_handler(_: str, **_kwargs: Any) -> CallbackResult:
"""Response handler for this test."""
await asyncio.sleep(2)
return CallbackResult(body="Goodmorning!")
responses.post(
f"{WITHINGS_URL}/v2/user",
callback=response_handler,
)
async with WithingsClient(request_timeout=1) as withings:
with pytest.raises(WithingsConnectionError):
> assert await withings.get_devices()
tests/test_withings.py:129:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb624e9f0>
orig_self = <aiohttp.client.ClientSession object at 0xffffb624f9e0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer None', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer None'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
___________ test_error_codes[100-WithingsAuthenticationFailedError] ____________
responses = <aioresponses.core.aioresponses object at 0xffffb6081550>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb6081070>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
status = 100
error = <class 'aiowithings.exceptions.WithingsAuthenticationFailedError'>
@pytest.mark.parametrize(
("status", "error"),
[
(100, WithingsAuthenticationFailedError),
(201, WithingsInvalidParamsError),
(214, WithingsUnauthorizedError),
(215, WithingsErrorOccurredError),
(522, WithingsConnectionError),
(524, WithingsBadStateError),
(601, WithingsTooManyRequestsError),
(-1, WithingsUnknownStatusError),
(None, WithingsUnknownStatusError),
],
)
async def test_error_codes(
responses: aioresponses,
authenticated_client: WithingsClient,
status: int | None,
error: type[Exception],
) -> None:
"""Test error codes from withings."""
response_data = json.loads(load_fixture("device.json"))
response_data["status"] = status
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=json.dumps(response_data),
)
with pytest.raises(error):
> assert await authenticated_client.get_devices()
tests/test_withings.py:162:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb6081550>
orig_self = <aiohttp.client.ClientSession object at 0xffffb6081070>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_______________ test_error_codes[201-WithingsInvalidParamsError] _______________
responses = <aioresponses.core.aioresponses object at 0xffffb624f590>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb624e120>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
status = 201
error = <class 'aiowithings.exceptions.WithingsInvalidParamsError'>
@pytest.mark.parametrize(
("status", "error"),
[
(100, WithingsAuthenticationFailedError),
(201, WithingsInvalidParamsError),
(214, WithingsUnauthorizedError),
(215, WithingsErrorOccurredError),
(522, WithingsConnectionError),
(524, WithingsBadStateError),
(601, WithingsTooManyRequestsError),
(-1, WithingsUnknownStatusError),
(None, WithingsUnknownStatusError),
],
)
async def test_error_codes(
responses: aioresponses,
authenticated_client: WithingsClient,
status: int | None,
error: type[Exception],
) -> None:
"""Test error codes from withings."""
response_data = json.loads(load_fixture("device.json"))
response_data["status"] = status
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=json.dumps(response_data),
)
with pytest.raises(error):
> assert await authenticated_client.get_devices()
tests/test_withings.py:162:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb624f590>
orig_self = <aiohttp.client.ClientSession object at 0xffffb624e120>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_______________ test_error_codes[214-WithingsUnauthorizedError] ________________
responses = <aioresponses.core.aioresponses object at 0xffffb5e80fb0>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb6082960>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
status = 214, error = <class 'aiowithings.exceptions.WithingsUnauthorizedError'>
@pytest.mark.parametrize(
("status", "error"),
[
(100, WithingsAuthenticationFailedError),
(201, WithingsInvalidParamsError),
(214, WithingsUnauthorizedError),
(215, WithingsErrorOccurredError),
(522, WithingsConnectionError),
(524, WithingsBadStateError),
(601, WithingsTooManyRequestsError),
(-1, WithingsUnknownStatusError),
(None, WithingsUnknownStatusError),
],
)
async def test_error_codes(
responses: aioresponses,
authenticated_client: WithingsClient,
status: int | None,
error: type[Exception],
) -> None:
"""Test error codes from withings."""
response_data = json.loads(load_fixture("device.json"))
response_data["status"] = status
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=json.dumps(response_data),
)
with pytest.raises(error):
> assert await authenticated_client.get_devices()
tests/test_withings.py:162:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5e80fb0>
orig_self = <aiohttp.client.ClientSession object at 0xffffb6082960>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_______________ test_error_codes[215-WithingsErrorOccurredError] _______________
responses = <aioresponses.core.aioresponses object at 0xffffb61a0b00>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb61a3ad0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
status = 215
error = <class 'aiowithings.exceptions.WithingsErrorOccurredError'>
@pytest.mark.parametrize(
("status", "error"),
[
(100, WithingsAuthenticationFailedError),
(201, WithingsInvalidParamsError),
(214, WithingsUnauthorizedError),
(215, WithingsErrorOccurredError),
(522, WithingsConnectionError),
(524, WithingsBadStateError),
(601, WithingsTooManyRequestsError),
(-1, WithingsUnknownStatusError),
(None, WithingsUnknownStatusError),
],
)
async def test_error_codes(
responses: aioresponses,
authenticated_client: WithingsClient,
status: int | None,
error: type[Exception],
) -> None:
"""Test error codes from withings."""
response_data = json.loads(load_fixture("device.json"))
response_data["status"] = status
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=json.dumps(response_data),
)
with pytest.raises(error):
> assert await authenticated_client.get_devices()
tests/test_withings.py:162:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb61a0b00>
orig_self = <aiohttp.client.ClientSession object at 0xffffb61a3ad0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
________________ test_error_codes[522-WithingsConnectionError] _________________
responses = <aioresponses.core.aioresponses object at 0xffffb61a3890>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb5e80c80>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
status = 522, error = <class 'aiowithings.exceptions.WithingsConnectionError'>
@pytest.mark.parametrize(
("status", "error"),
[
(100, WithingsAuthenticationFailedError),
(201, WithingsInvalidParamsError),
(214, WithingsUnauthorizedError),
(215, WithingsErrorOccurredError),
(522, WithingsConnectionError),
(524, WithingsBadStateError),
(601, WithingsTooManyRequestsError),
(-1, WithingsUnknownStatusError),
(None, WithingsUnknownStatusError),
],
)
async def test_error_codes(
responses: aioresponses,
authenticated_client: WithingsClient,
status: int | None,
error: type[Exception],
) -> None:
"""Test error codes from withings."""
response_data = json.loads(load_fixture("device.json"))
response_data["status"] = status
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=json.dumps(response_data),
)
with pytest.raises(error):
> assert await authenticated_client.get_devices()
tests/test_withings.py:162:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb61a3890>
orig_self = <aiohttp.client.ClientSession object at 0xffffb5e80c80>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_________________ test_error_codes[524-WithingsBadStateError] __________________
responses = <aioresponses.core.aioresponses object at 0xffffb624d880>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb5e80f50>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
status = 524, error = <class 'aiowithings.exceptions.WithingsBadStateError'>
@pytest.mark.parametrize(
("status", "error"),
[
(100, WithingsAuthenticationFailedError),
(201, WithingsInvalidParamsError),
(214, WithingsUnauthorizedError),
(215, WithingsErrorOccurredError),
(522, WithingsConnectionError),
(524, WithingsBadStateError),
(601, WithingsTooManyRequestsError),
(-1, WithingsUnknownStatusError),
(None, WithingsUnknownStatusError),
],
)
async def test_error_codes(
responses: aioresponses,
authenticated_client: WithingsClient,
status: int | None,
error: type[Exception],
) -> None:
"""Test error codes from withings."""
response_data = json.loads(load_fixture("device.json"))
response_data["status"] = status
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=json.dumps(response_data),
)
with pytest.raises(error):
> assert await authenticated_client.get_devices()
tests/test_withings.py:162:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb624d880>
orig_self = <aiohttp.client.ClientSession object at 0xffffb5e80f50>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
______________ test_error_codes[601-WithingsTooManyRequestsError] ______________
responses = <aioresponses.core.aioresponses object at 0xffffb5d001a0>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb624f170>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
status = 601
error = <class 'aiowithings.exceptions.WithingsTooManyRequestsError'>
@pytest.mark.parametrize(
("status", "error"),
[
(100, WithingsAuthenticationFailedError),
(201, WithingsInvalidParamsError),
(214, WithingsUnauthorizedError),
(215, WithingsErrorOccurredError),
(522, WithingsConnectionError),
(524, WithingsBadStateError),
(601, WithingsTooManyRequestsError),
(-1, WithingsUnknownStatusError),
(None, WithingsUnknownStatusError),
],
)
async def test_error_codes(
responses: aioresponses,
authenticated_client: WithingsClient,
status: int | None,
error: type[Exception],
) -> None:
"""Test error codes from withings."""
response_data = json.loads(load_fixture("device.json"))
response_data["status"] = status
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=json.dumps(response_data),
)
with pytest.raises(error):
> assert await authenticated_client.get_devices()
tests/test_withings.py:162:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5d001a0>
orig_self = <aiohttp.client.ClientSession object at 0xffffb624f170>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_______________ test_error_codes[-1-WithingsUnknownStatusError] ________________
responses = <aioresponses.core.aioresponses object at 0xffffb5d03500>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb5d02de0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
status = -1, error = <class 'aiowithings.exceptions.WithingsUnknownStatusError'>
@pytest.mark.parametrize(
("status", "error"),
[
(100, WithingsAuthenticationFailedError),
(201, WithingsInvalidParamsError),
(214, WithingsUnauthorizedError),
(215, WithingsErrorOccurredError),
(522, WithingsConnectionError),
(524, WithingsBadStateError),
(601, WithingsTooManyRequestsError),
(-1, WithingsUnknownStatusError),
(None, WithingsUnknownStatusError),
],
)
async def test_error_codes(
responses: aioresponses,
authenticated_client: WithingsClient,
status: int | None,
error: type[Exception],
) -> None:
"""Test error codes from withings."""
response_data = json.loads(load_fixture("device.json"))
response_data["status"] = status
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=json.dumps(response_data),
)
with pytest.raises(error):
> assert await authenticated_client.get_devices()
tests/test_withings.py:162:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5d03500>
orig_self = <aiohttp.client.ClientSession object at 0xffffb5d02de0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
______________ test_error_codes[None-WithingsUnknownStatusError] _______________
responses = <aioresponses.core.aioresponses object at 0xffffb5e81070>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb624d880>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
status = None
error = <class 'aiowithings.exceptions.WithingsUnknownStatusError'>
@pytest.mark.parametrize(
("status", "error"),
[
(100, WithingsAuthenticationFailedError),
(201, WithingsInvalidParamsError),
(214, WithingsUnauthorizedError),
(215, WithingsErrorOccurredError),
(522, WithingsConnectionError),
(524, WithingsBadStateError),
(601, WithingsTooManyRequestsError),
(-1, WithingsUnknownStatusError),
(None, WithingsUnknownStatusError),
],
)
async def test_error_codes(
responses: aioresponses,
authenticated_client: WithingsClient,
status: int | None,
error: type[Exception],
) -> None:
"""Test error codes from withings."""
response_data = json.loads(load_fixture("device.json"))
response_data["status"] = status
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=json.dumps(response_data),
)
with pytest.raises(error):
> assert await authenticated_client.get_devices()
tests/test_withings.py:162:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5e81070>
orig_self = <aiohttp.client.ClientSession object at 0xffffb624d880>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
__________________________ test_get_activities_since ___________________________
responses = <aioresponses.core.aioresponses object at 0xffffb6201dc0>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb624fb90>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_activities_since(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving activities."""
responses.post(
f"{WITHINGS_URL}/v2/measure",
status=200,
body=load_fixture("activity.json"),
)
> response = await authenticated_client.get_activities_since(
datetime.fromtimestamp(1609559200, tz=timezone.utc),
activity_data_fields=[ActivityDataFields.DISTANCE],
)
tests/test_withings.py:176:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:290: in get_activities_since
return await self._get_activities(
aiowithings/withings.py:278: in _get_activities
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb6201dc0>
orig_self = <aiohttp.client.ClientSession object at 0xffffb624fb90>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/measure'), args = ()
kwargs = {'data': {'action': 'getactivity', 'data_fields': 'distance', 'lastupdate': 1609559200}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/measure')
url_str = 'https://wbsapi.withings.net/v2/measure'
key = ('POST', URL('https://wbsapi.withings.net/v2/measure'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...st'}, 'data': {'lastupdate': 1609559200, 'action': 'getactivity', 'data_fields': 'distance'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/measure
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
__________________________ test_get_activities_period __________________________
responses = <aioresponses.core.aioresponses object at 0xffffb6203b00>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb62004a0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_activities_period(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving activities."""
responses.post(
f"{WITHINGS_URL}/v2/measure",
status=200,
body=load_fixture("activity.json"),
)
> response = await authenticated_client.get_activities_in_period(
start_date=datetime.fromtimestamp(1609459200, tz=timezone.utc),
end_date=datetime.fromtimestamp(1609559200, tz=timezone.utc),
)
tests/test_withings.py:204:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:302: in get_activities_in_period
return await self._get_activities(
aiowithings/withings.py:278: in _get_activities
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb6203b00>
orig_self = <aiohttp.client.ClientSession object at 0xffffb62004a0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/measure'), args = ()
kwargs = {'data': {'action': 'getactivity', 'enddateymd': '2021-01-02 03:46:40+00:00', 'startdateymd': '2021-01-01 00:00:00+00:...s': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/measure')
url_str = 'https://wbsapi.withings.net/v2/measure'
key = ('POST', URL('https://wbsapi.withings.net/v2/measure'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...1-01-01 00:00:00+00:00', 'enddateymd': '2021-01-02 03:46:40+00:00', 'action': 'getactivity'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/measure
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_______________________________ test_get_devices _______________________________
responses = <aioresponses.core.aioresponses object at 0xffffb5e816a0>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb5e81550>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_devices(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving devices."""
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=load_fixture("device.json"),
)
> response = await authenticated_client.get_devices()
tests/test_withings.py:232:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5e816a0>
orig_self = <aiohttp.client.ClientSession object at 0xffffb5e81550>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_____________________________ test_get_new_device ______________________________
responses = <aioresponses.core.aioresponses object at 0xffffb5d38d10>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb5d028d0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
caplog = <_pytest.logging.LogCaptureFixture object at 0xffffb5d03980>
async def test_get_new_device(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
caplog: pytest.LogCaptureFixture,
) -> None:
"""Test retrieving devices that aren't known yet."""
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=load_fixture("new_device.json"),
)
> response = await authenticated_client.get_devices()
tests/test_withings.py:254:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:151: in get_devices
response = await self._request("v2/user", data={"action": "getdevice"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5d38d10>
orig_self = <aiohttp.client.ClientSession object at 0xffffb5d028d0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getdevice'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getdevice'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
____________________________ test_get_goals[goals] _____________________________
responses = <aioresponses.core.aioresponses object at 0xffffb624f1d0>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb624fce0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
fixture = 'goals'
@pytest.mark.parametrize(
"fixture",
[
"goals",
"goals_1",
"goals_2",
"no_goals",
],
)
async def test_get_goals(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
fixture: str,
) -> None:
"""Test retrieving goals."""
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=load_fixture(f"{fixture}.json"),
)
> response = await authenticated_client.get_goals()
tests/test_withings.py:288:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:156: in get_goals
response = await self._request("v2/user", data={"action": "getgoals"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb624f1d0>
orig_self = <aiohttp.client.ClientSession object at 0xffffb624fce0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getgoals'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getgoals'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
___________________________ test_get_goals[goals_1] ____________________________
responses = <aioresponses.core.aioresponses object at 0xffffb61a22d0>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb5e829f0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
fixture = 'goals_1'
@pytest.mark.parametrize(
"fixture",
[
"goals",
"goals_1",
"goals_2",
"no_goals",
],
)
async def test_get_goals(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
fixture: str,
) -> None:
"""Test retrieving goals."""
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=load_fixture(f"{fixture}.json"),
)
> response = await authenticated_client.get_goals()
tests/test_withings.py:288:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:156: in get_goals
response = await self._request("v2/user", data={"action": "getgoals"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb61a22d0>
orig_self = <aiohttp.client.ClientSession object at 0xffffb5e829f0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getgoals'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getgoals'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
___________________________ test_get_goals[goals_2] ____________________________
responses = <aioresponses.core.aioresponses object at 0xffffb5d3a960>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb5d3a0c0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
fixture = 'goals_2'
@pytest.mark.parametrize(
"fixture",
[
"goals",
"goals_1",
"goals_2",
"no_goals",
],
)
async def test_get_goals(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
fixture: str,
) -> None:
"""Test retrieving goals."""
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=load_fixture(f"{fixture}.json"),
)
> response = await authenticated_client.get_goals()
tests/test_withings.py:288:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:156: in get_goals
response = await self._request("v2/user", data={"action": "getgoals"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5d3a960>
orig_self = <aiohttp.client.ClientSession object at 0xffffb5d3a0c0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getgoals'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getgoals'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
___________________________ test_get_goals[no_goals] ___________________________
responses = <aioresponses.core.aioresponses object at 0xffffb5d38c20>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb5d39a00>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
fixture = 'no_goals'
@pytest.mark.parametrize(
"fixture",
[
"goals",
"goals_1",
"goals_2",
"no_goals",
],
)
async def test_get_goals(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
fixture: str,
) -> None:
"""Test retrieving goals."""
responses.post(
f"{WITHINGS_URL}/v2/user",
status=200,
body=load_fixture(f"{fixture}.json"),
)
> response = await authenticated_client.get_goals()
tests/test_withings.py:288:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:156: in get_goals
response = await self._request("v2/user", data={"action": "getgoals"})
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5d38c20>
orig_self = <aiohttp.client.ClientSession object at 0xffffb5d39a00>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/user'), args = ()
kwargs = {'data': {'action': 'getgoals'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/user')
url_str = 'https://wbsapi.withings.net/v2/user'
key = ('POST', URL('https://wbsapi.withings.net/v2/user'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'getgoals'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/user
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
__________________________ test_get_measurement_since __________________________
responses = <aioresponses.core.aioresponses object at 0xffffb5cd4d70>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb5cd7320>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_measurement_since(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving measurements."""
responses.post(
f"{WITHINGS_URL}/measure",
status=200,
body=load_fixture("measurement.json"),
)
> response = await authenticated_client.get_measurement_since(
datetime.fromtimestamp(1609459200, tz=timezone.utc),
measurement_types=[MeasurementType.WEIGHT],
)
tests/test_withings.py:309:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:181: in get_measurement_since
return await self._get_measurements(
aiowithings/withings.py:169: in _get_measurements
response = await self._request("measure", data=data)
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5cd4d70>
orig_self = <aiohttp.client.ClientSession object at 0xffffb5cd7320>
method = 'POST', url = URL('https://wbsapi.withings.net/measure'), args = ()
kwargs = {'data': {'action': 'getmeas', 'lastupdate': 1609459200, 'meastypes': '1'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/measure')
url_str = 'https://wbsapi.withings.net/measure'
key = ('POST', URL('https://wbsapi.withings.net/measure'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...': 'Bearer test'}, 'data': {'lastupdate': 1609459200, 'action': 'getmeas', 'meastypes': '1'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/measure
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_________________________ test_get_measurement_period __________________________
responses = <aioresponses.core.aioresponses object at 0xffffb5cd68a0>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb5cd69c0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_measurement_period(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving measurements."""
responses.post(
f"{WITHINGS_URL}/measure",
status=200,
body=load_fixture("measurement.json"),
)
> response = await authenticated_client.get_measurement_in_period(
start_date=datetime.fromtimestamp(1609459200, tz=timezone.utc),
end_date=datetime.fromtimestamp(1609559200, tz=timezone.utc),
)
tests/test_withings.py:333:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:193: in get_measurement_in_period
return await self._get_measurements(
aiowithings/withings.py:169: in _get_measurements
response = await self._request("measure", data=data)
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5cd68a0>
orig_self = <aiohttp.client.ClientSession object at 0xffffb5cd69c0>
method = 'POST', url = URL('https://wbsapi.withings.net/measure'), args = ()
kwargs = {'data': {'action': 'getmeas', 'enddate': 1609559200, 'startdate': 1609459200}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/measure')
url_str = 'https://wbsapi.withings.net/measure'
key = ('POST', URL('https://wbsapi.withings.net/measure'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...Bearer test'}, 'data': {'startdate': 1609459200, 'enddate': 1609559200, 'action': 'getmeas'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/measure
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_______________________________ test_subscribing _______________________________
responses = <aioresponses.core.aioresponses object at 0xffffb5cacf50>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb5cacce0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_subscribing(
responses: aioresponses,
authenticated_client: WithingsClient,
) -> None:
"""Test subscribing to webhook updates."""
responses.post(
f"{WITHINGS_URL}/notify",
status=200,
body=load_fixture("notify_subscribe.json"),
)
> await authenticated_client.subscribe_notification(
"https://test.com/callback",
NotificationCategory.PRESSURE,
)
tests/test_withings.py:356:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:352: in subscribe_notification
await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5cacf50>
orig_self = <aiohttp.client.ClientSession object at 0xffffb5cacce0>
method = 'POST', url = URL('https://wbsapi.withings.net/notify'), args = ()
kwargs = {'data': {'action': 'subscribe', 'appli': <NotificationCategory.PRESSURE: 4>, 'callbackurl': 'https://test.com/callbac...s': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/notify')
url_str = 'https://wbsapi.withings.net/notify'
key = ('POST', URL('https://wbsapi.withings.net/notify'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...e', 'callbackurl': 'https://test.com/callback', 'appli': <NotificationCategory.PRESSURE: 4>}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/notify
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
________________________________ test_revoking _________________________________
responses = <aioresponses.core.aioresponses object at 0xffffb5caf650>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb5caebd0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_revoking(
responses: aioresponses,
authenticated_client: WithingsClient,
) -> None:
"""Test subscribing to webhook updates."""
responses.post(
f"{WITHINGS_URL}/notify",
status=200,
body=load_fixture("notify_revoke.json"),
)
> await authenticated_client.revoke_notification_configurations(
"https://test.com/callback",
NotificationCategory.PRESSURE,
)
tests/test_withings.py:382:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:386: in revoke_notification_configurations
await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5caf650>
orig_self = <aiohttp.client.ClientSession object at 0xffffb5caebd0>
method = 'POST', url = URL('https://wbsapi.withings.net/notify'), args = ()
kwargs = {'data': {'action': 'revoke', 'appli': <NotificationCategory.PRESSURE: 4>, 'callbackurl': 'https://test.com/callback'}...s': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/notify')
url_str = 'https://wbsapi.withings.net/notify'
key = ('POST', URL('https://wbsapi.withings.net/notify'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...e', 'callbackurl': 'https://test.com/callback', 'appli': <NotificationCategory.PRESSURE: 4>}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/notify
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
___________________________ test_list_subscriptions ____________________________
responses = <aioresponses.core.aioresponses object at 0xffffb5cd5a60>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb5cd4410>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_list_subscriptions(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving subscriptions."""
responses.post(
f"{WITHINGS_URL}/notify",
status=200,
body=load_fixture("notify_list.json"),
)
> response = await authenticated_client.list_notification_configurations(
NotificationCategory.WEIGHT,
)
tests/test_withings.py:409:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:371: in list_notification_configurations
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5cd5a60>
orig_self = <aiohttp.client.ClientSession object at 0xffffb5cd4410>
method = 'POST', url = URL('https://wbsapi.withings.net/notify'), args = ()
kwargs = {'data': {'action': 'list', 'appli': <NotificationCategory.WEIGHT: 1>}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/notify')
url_str = 'https://wbsapi.withings.net/notify'
key = ('POST', URL('https://wbsapi.withings.net/notify'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...tion': 'Bearer test'}, 'data': {'action': 'list', 'appli': <NotificationCategory.WEIGHT: 1>}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/notify
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_________________________ test_list_all_subscriptions __________________________
responses = <aioresponses.core.aioresponses object at 0xffffb5ceeea0>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb5cef7a0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_list_all_subscriptions(
responses: aioresponses,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving all subscriptions."""
responses.post(
f"{WITHINGS_URL}/notify",
status=200,
body=load_fixture("notify_list.json"),
)
> response = await authenticated_client.list_notification_configurations()
tests/test_withings.py:431:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:371: in list_notification_configurations
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5ceeea0>
orig_self = <aiohttp.client.ClientSession object at 0xffffb5cef7a0>
method = 'POST', url = URL('https://wbsapi.withings.net/notify'), args = ()
kwargs = {'data': {'action': 'list'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/notify')
url_str = 'https://wbsapi.withings.net/notify'
key = ('POST', URL('https://wbsapi.withings.net/notify'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'action': 'list'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/notify
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
________________________________ test_get_sleep ________________________________
responses = <aioresponses.core.aioresponses object at 0xffffb5cadcd0>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb5caf3b0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_sleep(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving sleep."""
responses.post(
f"{WITHINGS_URL}/v2/sleep",
status=200,
body=load_fixture("sleep.json"),
)
> response = await authenticated_client.get_sleep(
datetime.fromtimestamp(0, tz=timezone.utc),
datetime.fromtimestamp(1609559200, tz=timezone.utc),
[
SleepDataFields.HEART_RATE,
SleepDataFields.RESPIRATION_RATE,
SleepDataFields.SNORING,
SleepDataFields.HEART_RATE_VARIABILITY,
SleepDataFields.HEART_RATE_VARIABILITY_2,
SleepDataFields.MOVEMENT_SCORE,
],
)
tests/test_withings.py:479:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:217: in get_sleep
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5cadcd0>
orig_self = <aiohttp.client.ClientSession object at 0xffffb5caf3b0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/sleep'), args = ()
kwargs = {'data': {'action': 'get', 'data_fields': 'hr,rr,snoring,sdnn_1,rmssd,mvt_score', 'enddate': 1609559200, 'startdate': ...s': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/sleep')
url_str = 'https://wbsapi.withings.net/v2/sleep'
key = ('POST', URL('https://wbsapi.withings.net/v2/sleep'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...startdate': 0, 'enddate': 1609559200, 'data_fields': 'hr,rr,snoring,sdnn_1,rmssd,mvt_score'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/sleep
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
______________________ test_get_sleep_without_data_fields ______________________
responses = <aioresponses.core.aioresponses object at 0xffffb5ce35c0>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb5ce22a0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_sleep_without_data_fields(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving sleep without datafields."""
responses.post(
f"{WITHINGS_URL}/v2/sleep",
status=200,
body=load_fixture("sleep_no_datafields.json"),
)
> response = await authenticated_client.get_sleep(
datetime.fromtimestamp(0, tz=timezone.utc),
datetime.fromtimestamp(1609559200, tz=timezone.utc),
)
tests/test_withings.py:516:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:217: in get_sleep
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5ce35c0>
orig_self = <aiohttp.client.ClientSession object at 0xffffb5ce22a0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/sleep'), args = ()
kwargs = {'data': {'action': 'get', 'enddate': 1609559200, 'startdate': 0}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/sleep')
url_str = 'https://wbsapi.withings.net/v2/sleep'
key = ('POST', URL('https://wbsapi.withings.net/v2/sleep'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...orization': 'Bearer test'}, 'data': {'action': 'get', 'startdate': 0, 'enddate': 1609559200}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/sleep
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_______________________ test_get_sleep_summary_in_period _______________________
responses = <aioresponses.core.aioresponses object at 0xffffb5ce29c0>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb5ce2810>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_sleep_summary_in_period(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving sleep."""
responses.post(
f"{WITHINGS_URL}/v2/sleep",
status=200,
body=load_fixture("sleep_summary.json"),
)
> response = await authenticated_client.get_sleep_summary_in_period(
start_date=datetime.fromtimestamp(0, tz=timezone.utc).date(),
end_date=datetime.fromtimestamp(1609559200, tz=timezone.utc).date(),
sleep_summary_data_fields=[
SleepSummaryDataFields.REM_SLEEP_PHASE_COUNT,
SleepSummaryDataFields.SLEEP_EFFICIENCY,
SleepSummaryDataFields.SLEEP_LATENCY,
SleepSummaryDataFields.TOTAL_SLEEP_TIME,
SleepSummaryDataFields.TOTAL_TIME_IN_BED,
SleepSummaryDataFields.WAKE_UP_LATENCY,
SleepSummaryDataFields.TIME_AWAKE_DURING_SLEEP,
SleepSummaryDataFields.APNEA_HYPOPNEA_INDEX,
SleepSummaryDataFields.BREATHING_DISTURBANCES_INTENSITY,
SleepSummaryDataFields.EXTERNAL_TOTAL_SLEEP_TIME,
SleepSummaryDataFields.DEEP_SLEEP_DURATION,
SleepSummaryDataFields.AVERAGE_HEART_RATE,
SleepSummaryDataFields.MIN_HEART_RATE,
SleepSummaryDataFields.MAX_HEART_RATE,
SleepSummaryDataFields.LIGHT_SLEEP_DURATION,
SleepSummaryDataFields.ACTIVE_MOVEMENT_DURATION,
SleepSummaryDataFields.AVERAGE_MOVEMENT_SCORE,
SleepSummaryDataFields.NIGHT_EVENTS,
SleepSummaryDataFields.OUT_OF_BED_COUNT,
SleepSummaryDataFields.REM_SLEEP_DURATION,
SleepSummaryDataFields.AVERAGE_RESPIRATION_RATE,
SleepSummaryDataFields.MIN_RESPIRATION_RATE,
SleepSummaryDataFields.MAX_RESPIRATION_RATE,
SleepSummaryDataFields.SLEEP_SCORE,
SleepSummaryDataFields.SNORING,
SleepSummaryDataFields.SNORING_COUNT,
SleepSummaryDataFields.WAKE_UP_COUNT,
SleepSummaryDataFields.TOTAL_TIME_AWAKE,
SleepSummaryDataFields.WITHINGS_INDEX,
],
)
tests/test_withings.py:540:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:260: in get_sleep_summary_in_period
return await self._get_sleep_summary(
aiowithings/withings.py:236: in _get_sleep_summary
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5ce29c0>
orig_self = <aiohttp.client.ClientSession object at 0xffffb5ce2810>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/sleep'), args = ()
kwargs = {'data': {'action': 'getsummary', 'data_fields': 'nb_rem_episodes,sleep_efficiency,sleep_latency,total_sleep_time,tota...s': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/sleep')
url_str = 'https://wbsapi.withings.net/v2/sleep'
key = ('POST', URL('https://wbsapi.withings.net/v2/sleep'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...n,rr_max,sleep_score,snoring,snoringepisodecount,wakeupcount,wakeupduration,withings_index'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/sleep
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_____________ test_get_sleep_summary_in_period_without_data_fields _____________
responses = <aioresponses.core.aioresponses object at 0xffffb5d387a0>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb5cafda0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_sleep_summary_in_period_without_data_fields(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving sleep without datafields."""
responses.post(
f"{WITHINGS_URL}/v2/sleep",
status=200,
body=load_fixture("sleep_summary_no_datafields.json"),
)
> response = await authenticated_client.get_sleep_summary_in_period(
start_date=datetime.fromtimestamp(0, tz=timezone.utc).date(),
end_date=datetime.fromtimestamp(1609559200, tz=timezone.utc).date(),
)
tests/test_withings.py:606:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:260: in get_sleep_summary_in_period
return await self._get_sleep_summary(
aiowithings/withings.py:236: in _get_sleep_summary
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5d387a0>
orig_self = <aiohttp.client.ClientSession object at 0xffffb5cafda0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/sleep'), args = ()
kwargs = {'data': {'action': 'getsummary', 'enddateymd': '2021-01-02', 'startdateymd': '1970-01-01'}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/sleep')
url_str = 'https://wbsapi.withings.net/v2/sleep'
key = ('POST', URL('https://wbsapi.withings.net/v2/sleep'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *..., 'data': {'startdateymd': '1970-01-01', 'enddateymd': '2021-01-02', 'action': 'getsummary'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/sleep
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_________________________ test_get_sleep_summary_since _________________________
responses = <aioresponses.core.aioresponses object at 0xffffb6202600>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb5cac3b0>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_sleep_summary_since(
responses: aioresponses,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving sleep."""
responses.post(
f"{WITHINGS_URL}/v2/sleep",
status=200,
body=load_fixture("sleep_summary.json"),
)
> response = await authenticated_client.get_sleep_summary_since(
sleep_summary_since=datetime.fromtimestamp(0, tz=timezone.utc),
sleep_summary_data_fields=[
SleepSummaryDataFields.REM_SLEEP_PHASE_COUNT,
SleepSummaryDataFields.SLEEP_EFFICIENCY,
SleepSummaryDataFields.SLEEP_LATENCY,
SleepSummaryDataFields.TOTAL_SLEEP_TIME,
SleepSummaryDataFields.TOTAL_TIME_IN_BED,
SleepSummaryDataFields.WAKE_UP_LATENCY,
SleepSummaryDataFields.TIME_AWAKE_DURING_SLEEP,
SleepSummaryDataFields.APNEA_HYPOPNEA_INDEX,
SleepSummaryDataFields.BREATHING_DISTURBANCES_INTENSITY,
SleepSummaryDataFields.EXTERNAL_TOTAL_SLEEP_TIME,
SleepSummaryDataFields.DEEP_SLEEP_DURATION,
SleepSummaryDataFields.AVERAGE_HEART_RATE,
SleepSummaryDataFields.MIN_HEART_RATE,
SleepSummaryDataFields.MAX_HEART_RATE,
SleepSummaryDataFields.LIGHT_SLEEP_DURATION,
SleepSummaryDataFields.ACTIVE_MOVEMENT_DURATION,
SleepSummaryDataFields.AVERAGE_MOVEMENT_SCORE,
SleepSummaryDataFields.NIGHT_EVENTS,
SleepSummaryDataFields.OUT_OF_BED_COUNT,
SleepSummaryDataFields.REM_SLEEP_DURATION,
SleepSummaryDataFields.AVERAGE_RESPIRATION_RATE,
SleepSummaryDataFields.MIN_RESPIRATION_RATE,
SleepSummaryDataFields.MAX_RESPIRATION_RATE,
SleepSummaryDataFields.SLEEP_SCORE,
SleepSummaryDataFields.SNORING,
SleepSummaryDataFields.SNORING_COUNT,
SleepSummaryDataFields.WAKE_UP_COUNT,
SleepSummaryDataFields.TOTAL_TIME_AWAKE,
SleepSummaryDataFields.WITHINGS_INDEX,
],
)
tests/test_withings.py:633:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:248: in get_sleep_summary_since
return await self._get_sleep_summary(
aiowithings/withings.py:236: in _get_sleep_summary
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb6202600>
orig_self = <aiohttp.client.ClientSession object at 0xffffb5cac3b0>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/sleep'), args = ()
kwargs = {'data': {'action': 'getsummary', 'data_fields': 'nb_rem_episodes,sleep_efficiency,sleep_latency,total_sleep_time,tota...s': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/sleep')
url_str = 'https://wbsapi.withings.net/v2/sleep'
key = ('POST', URL('https://wbsapi.withings.net/v2/sleep'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...n,rr_max,sleep_score,snoring,snoringepisodecount,wakeupcount,wakeupduration,withings_index'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/sleep
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
_______________ test_get_sleep_summary_since_without_data_fields _______________
responses = <aioresponses.core.aioresponses object at 0xffffb62030b0>
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb6203b90>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_sleep_summary_since_without_data_fields(
responses: aioresponses,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving sleep without datafields."""
responses.post(
f"{WITHINGS_URL}/v2/sleep",
status=200,
body=load_fixture("sleep_summary_no_datafields.json"),
)
> response = await authenticated_client.get_sleep_summary_since(
datetime.fromtimestamp(0, tz=timezone.utc),
)
tests/test_withings.py:696:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:248: in get_sleep_summary_since
return await self._get_sleep_summary(
aiowithings/withings.py:236: in _get_sleep_summary
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb62030b0>
orig_self = <aiohttp.client.ClientSession object at 0xffffb6203b90>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/sleep'), args = ()
kwargs = {'data': {'action': 'getsummary', 'lastupdate': 0}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/sleep')
url_str = 'https://wbsapi.withings.net/v2/sleep'
key = ('POST', URL('https://wbsapi.withings.net/v2/sleep'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test'}, 'data': {'lastupdate': 0, 'action': 'getsummary'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/sleep
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
___________________________ test_get_workouts_since ____________________________
responses = <aioresponses.core.aioresponses object at 0xffffb5cad2b0>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb5d3a870>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_workouts_since(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving workouts."""
responses.post(
f"{WITHINGS_URL}/v2/measure",
status=200,
body=load_fixture("workouts.json"),
)
> response = await authenticated_client.get_workouts_since(
datetime.fromtimestamp(0, tz=timezone.utc),
workout_data_fields=[WorkoutDataFields.CALORIES],
)
tests/test_withings.py:722:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:329: in get_workouts_since
return await self._get_workouts(
aiowithings/withings.py:317: in _get_workouts
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb5cad2b0>
orig_self = <aiohttp.client.ClientSession object at 0xffffb5d3a870>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/measure'), args = ()
kwargs = {'data': {'action': 'getworkouts', 'data_fields': 'calories', 'lastupdate': 0}, 'headers': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/measure')
url_str = 'https://wbsapi.withings.net/v2/measure'
key = ('POST', URL('https://wbsapi.withings.net/v2/measure'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...Bearer test'}, 'data': {'lastupdate': 0, 'action': 'getworkouts', 'data_fields': 'calories'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/measure
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
___________________________ test_get_workouts_period ___________________________
responses = <aioresponses.core.aioresponses object at 0xffffb60814f0>
snapshot = SnapshotAssertion(name='snapshot', num_executions=0)
authenticated_client = WithingsClient(session=<aiohttp.client.ClientSession object at 0xffffb6081340>, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None)
async def test_get_workouts_period(
responses: aioresponses,
snapshot: SnapshotAssertion,
authenticated_client: WithingsClient,
) -> None:
"""Test retrieving workouts."""
responses.post(
f"{WITHINGS_URL}/v2/measure",
status=200,
body=load_fixture("workouts.json"),
)
> response = await authenticated_client.get_workouts_in_period(
start_date=datetime.fromtimestamp(0, tz=timezone.utc),
end_date=datetime.fromtimestamp(1609559200, tz=timezone.utc),
)
tests/test_withings.py:746:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
aiowithings/withings.py:341: in get_workouts_in_period
return await self._get_workouts(
aiowithings/withings.py:317: in _get_workouts
response = await self._request(
aiowithings/withings.py:108: in _request
response = await self.session.request(
/usr/lib/python3.12/unittest/mock.py:2293: in _execute_mock_call
result = await effect(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aioresponses.core.aioresponses object at 0xffffb60814f0>
orig_self = <aiohttp.client.ClientSession object at 0xffffb6081340>
method = 'POST', url = URL('https://wbsapi.withings.net/v2/measure'), args = ()
kwargs = {'data': {'action': 'getworkouts', 'enddateymd': '2021-01-02 03:46:40+00:00', 'startdateymd': '1970-01-01 00:00:00+00:...s': {'Accept': 'application/json, text/plain, */*', 'Authorization': 'Bearer test', 'User-Agent': 'AioWithings/2.1.0'}}
url_origin = URL('https://wbsapi.withings.net/v2/measure')
url_str = 'https://wbsapi.withings.net/v2/measure'
key = ('POST', URL('https://wbsapi.withings.net/v2/measure'))
request_call = RequestCall(args=(), kwargs={'headers': {'User-Agent': 'AioWithings/2.1.0', 'Accept': 'application/json, text/plain, *...0-01-01 00:00:00+00:00', 'enddateymd': '2021-01-02 03:46:40+00:00', 'action': 'getworkouts'}, 'allow_redirects': True})
response = None
async def _request_mock(self, orig_self: ClientSession,
method: str, url: 'Union[URL, str]',
*args: Tuple,
**kwargs: Any) -> 'ClientResponse':
"""Return mocked response object or raise connection error."""
if orig_self.closed:
raise RuntimeError('Session is closed')
url_origin = url
url = normalize_url(merge_params(url, kwargs.get('params')))
url_str = str(url)
for prefix in self._passthrough:
if url_str.startswith(prefix):
return (await self.patcher.temp_original(
orig_self, method, url_origin, *args, **kwargs
))
key = (method, url)
self.requests.setdefault(key, [])
request_call = self._build_request_call(method, *args, **kwargs)
self.requests[key].append(request_call)
response = await self.match(method, url, **kwargs)
if response is None:
> raise ClientConnectionError(
'Connection refused: {} {}'.format(method, url)
)
E aiohttp.client_exceptions.ClientConnectionError: Connection refused: POST https://wbsapi.withings.net/v2/measure
/usr/lib/python3/dist-packages/aioresponses/core.py:515: ClientConnectionError
---------- coverage: platform linux, python 3.12.7-final-0 -----------
Name Stmts Miss Branch BrPart Cover Missing
---------------------------------------------------------------------
aiowithings/models.py 563 79 94 0 82% 115-127, 149-154, 407, 450, 463-465, 516, 720-736, 876-926
aiowithings/util.py 16 3 0 0 81% 20-26
aiowithings/withings.py 132 35 40 1 69% 115-147, 152, 157, 170, 221, 240, 282, 321, 375
---------------------------------------------------------------------
TOTAL 761 117 152 1 81%
4 files skipped due to complete coverage.
FAIL Required test coverage of 100% not reached. Total coverage: 80.72%
--------------------------- snapshot report summary ----------------------------
22 snapshots passed. 17 snapshots unused.
Re-run pytest with --snapshot-update to delete unused snapshots.
=========================== short test summary info ============================
FAILED tests/test_withings.py::test_putting_in_own_session - aiohttp.client_e...
FAILED tests/test_withings.py::test_creating_own_session - aiohttp.client_exc...
FAILED tests/test_withings.py::test_unexpected_server_response - aiohttp.clie...
FAILED tests/test_withings.py::test_timeout - aiohttp.client_exceptions.Clien...
FAILED tests/test_withings.py::test_error_codes[100-WithingsAuthenticationFailedError]
FAILED tests/test_withings.py::test_error_codes[201-WithingsInvalidParamsError]
FAILED tests/test_withings.py::test_error_codes[214-WithingsUnauthorizedError]
FAILED tests/test_withings.py::test_error_codes[215-WithingsErrorOccurredError]
FAILED tests/test_withings.py::test_error_codes[522-WithingsConnectionError]
FAILED tests/test_withings.py::test_error_codes[524-WithingsBadStateError] - ...
FAILED tests/test_withings.py::test_error_codes[601-WithingsTooManyRequestsError]
FAILED tests/test_withings.py::test_error_codes[-1-WithingsUnknownStatusError]
FAILED tests/test_withings.py::test_error_codes[None-WithingsUnknownStatusError]
FAILED tests/test_withings.py::test_get_activities_since - aiohttp.client_exc...
FAILED tests/test_withings.py::test_get_activities_period - aiohttp.client_ex...
FAILED tests/test_withings.py::test_get_devices - aiohttp.client_exceptions.C...
FAILED tests/test_withings.py::test_get_new_device - aiohttp.client_exception...
FAILED tests/test_withings.py::test_get_goals[goals] - aiohttp.client_excepti...
FAILED tests/test_withings.py::test_get_goals[goals_1] - aiohttp.client_excep...
FAILED tests/test_withings.py::test_get_goals[goals_2] - aiohttp.client_excep...
FAILED tests/test_withings.py::test_get_goals[no_goals] - aiohttp.client_exce...
FAILED tests/test_withings.py::test_get_measurement_since - aiohttp.client_ex...
FAILED tests/test_withings.py::test_get_measurement_period - aiohttp.client_e...
FAILED tests/test_withings.py::test_subscribing - aiohttp.client_exceptions.C...
FAILED tests/test_withings.py::test_revoking - aiohttp.client_exceptions.Clie...
FAILED tests/test_withings.py::test_list_subscriptions - aiohttp.client_excep...
FAILED tests/test_withings.py::test_list_all_subscriptions - aiohttp.client_e...
FAILED tests/test_withings.py::test_get_sleep - aiohttp.client_exceptions.Cli...
FAILED tests/test_withings.py::test_get_sleep_without_data_fields - aiohttp.c...
FAILED tests/test_withings.py::test_get_sleep_summary_in_period - aiohttp.cli...
FAILED tests/test_withings.py::test_get_sleep_summary_in_period_without_data_fields
FAILED tests/test_withings.py::test_get_sleep_summary_since - aiohttp.client_...
FAILED tests/test_withings.py::test_get_sleep_summary_since_without_data_fields
FAILED tests/test_withings.py::test_get_workouts_since - aiohttp.client_excep...
FAILED tests/test_withings.py::test_get_workouts_period - aiohttp.client_exce...
======================== 35 failed, 25 passed in 7.51s =========================
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12/build; python3.12 -m pytest -v tests
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.13 3.12" returned exit code 13
make: *** [debian/rules:9: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2024-11-18T00:34:24Z
Finished
--------
+------------------------------------------------------------------------------+
| Cleanup |
+------------------------------------------------------------------------------+
Purging /<<BUILDDIR>>
Not cleaning session: cloned chroot in use
E: Build failure (dpkg-buildpackage died)
+------------------------------------------------------------------------------+
| Summary |
+------------------------------------------------------------------------------+
Build Architecture: arm64
Build Type: binary
Build-Space: 26944
Build-Time: 22
Distribution: sid
Fail-Stage: build
Host Architecture: arm64
Install-Time: 47
Job: /tmp/debusine-fetch-exec-upload-34zb_fyw/python-aiowithings_3.0.3-2.dsc
Machine Architecture: arm64
Package: python-aiowithings
Package-Time: 106
Source-Version: 3.0.3-2
Space: 26944
Status: attempted
Version: 3.0.3-2
--------------------------------------------------------------------------------
Finished at 2024-11-18T00:34:24Z
Build needed 00:01:46, 26944k disk space