Tue Oct 15 04:32:06 UTC 2024 I: starting to build python-aiowithings/unstable/armhf on jenkins on '2024-10-15 04:32' Tue Oct 15 04:32:06 UTC 2024 I: The jenkins build log is/was available at https://jenkins.debian.net/userContent/reproducible/debian/build_service/armhf_15/9572/console.log Tue Oct 15 04:32:06 UTC 2024 I: Downloading source for unstable/python-aiowithings=3.0.3-2 --2024-10-15 04:32:06-- http://deb.debian.org/debian/pool/main/p/python-aiowithings/python-aiowithings_3.0.3-2.dsc Connecting to 46.16.76.132:3128... connected. Proxy request sent, awaiting response... 200 OK Length: 2415 (2.4K) [text/prs.lines.tag] Saving to: ‘python-aiowithings_3.0.3-2.dsc’ 0K .. 100% 307M=0s 2024-10-15 04:32:06 (307 MB/s) - ‘python-aiowithings_3.0.3-2.dsc’ saved [2415/2415] Tue Oct 15 04:32:06 UTC 2024 I: python-aiowithings_3.0.3-2.dsc -----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 Uploaders: Thomas Goirand , 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----- Tue Oct 15 04:32:06 UTC 2024 I: Checking whether the package is not for us Tue Oct 15 04:32:06 UTC 2024 I: Starting 1st build on remote node virt64b-armhf-rb.debian.net. Tue Oct 15 04:32:06 UTC 2024 I: Preparing to do remote build '1' on virt64b-armhf-rb.debian.net. Tue Oct 15 04:37:12 UTC 2024 I: Deleting $TMPDIR on virt64b-armhf-rb.debian.net. I: pbuilder: network access will be disabled during build I: Current time: Mon Oct 14 16:32:14 -12 2024 I: pbuilder-time-stamp: 1728966734 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/unstable-reproducible-base.tgz] I: copying local configuration W: --override-config is not set; not updating apt.conf Read the manpage for details. I: mounting /proc filesystem I: mounting /sys filesystem I: creating /{dev,run}/shm I: mounting /dev/pts filesystem I: redirecting /dev/ptmx to /dev/pts/ptmx I: policy-rc.d already exists I: Copying source file I: copying [python-aiowithings_3.0.3-2.dsc] I: copying [./python-aiowithings_3.0.3.orig.tar.xz] I: copying [./python-aiowithings_3.0.3-2.debian.tar.xz] I: Extracting source gpgv: Signature made Sat Sep 7 20:26:30 2024 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 python-aiowithings-3.0.3 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 I: using fakeroot in build. I: Installing the build-deps I: user script /srv/workspace/pbuilder/21743/tmp/hooks/D02_print_environment starting I: set BUILDDIR='/build/reproducible-path' BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' BUILDUSERNAME='pbuilder1' BUILD_ARCH='armhf' DEBIAN_FRONTEND='noninteractive' DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=3 ' DISTRIBUTION='unstable' HOME='/root' HOST_ARCH='armhf' IFS=' ' INVOCATION_ID='b9ffb4875fff4924b55748d69fd84f6b' LANG='C' LANGUAGE='en_US:en' LC_ALL='C' MAIL='/var/mail/root' OPTIND='1' PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' PBCURRENTCOMMANDLINEOPERATION='build' PBUILDER_OPERATION='build' PBUILDER_PKGDATADIR='/usr/share/pbuilder' PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' PBUILDER_SYSCONFDIR='/etc' PPID='21743' PS1='# ' PS2='> ' PS4='+ ' PWD='/' SHELL='/bin/bash' SHLVL='2' SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.B1bb6HIc/pbuilderrc_T3Re --distribution unstable --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/unstable-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.B1bb6HIc/b1 --logfile b1/build.log python-aiowithings_3.0.3-2.dsc' SUDO_GID='113' SUDO_UID='107' SUDO_USER='jenkins' TERM='unknown' TZ='/usr/share/zoneinfo/Etc/GMT+12' USER='root' _='/usr/bin/systemd-run' http_proxy='http://10.0.0.15:3142/' I: uname -a Linux virt64b 6.1.0-26-arm64 #1 SMP Debian 6.1.112-1 (2024-09-30) aarch64 GNU/Linux I: ls -l /bin lrwxrwxrwx 1 root root 7 Aug 4 21:30 /bin -> usr/bin I: user script /srv/workspace/pbuilder/21743/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy Version: 0.invalid.0 Architecture: armhf Maintainer: Debian Pbuilder Team Description: Dummy package to satisfy dependencies with aptitude - created by pbuilder This package was created automatically by pbuilder to satisfy the build-dependencies of the package being currently built. Depends: debhelper-compat (= 11), dh-python, openstack-pkg-tools, pybuild-plugin-pyproject, python3-all, python3-poetry-core, python3-setuptools, python3-aiohttp, python3-aioresponses, python3-covdefaults, python3-pytest, python3-pytest-asyncio, python3-pytest-cov, python3-syrupy, python3-yarl dpkg-deb: building package 'pbuilder-satisfydepends-dummy' in '/tmp/satisfydepends-aptitude/pbuilder-satisfydepends-dummy.deb'. Selecting previously unselected package pbuilder-satisfydepends-dummy. (Reading database ... 21597 files and directories currently installed.) Preparing to unpack .../pbuilder-satisfydepends-dummy.deb ... Unpacking pbuilder-satisfydepends-dummy (0.invalid.0) ... dpkg: pbuilder-satisfydepends-dummy: dependency problems, but configuring anyway as you requested: pbuilder-satisfydepends-dummy depends on debhelper-compat (= 11); however: Package debhelper-compat is not installed. pbuilder-satisfydepends-dummy depends on dh-python; however: Package dh-python is not installed. pbuilder-satisfydepends-dummy depends on openstack-pkg-tools; however: Package openstack-pkg-tools is not installed. pbuilder-satisfydepends-dummy depends on pybuild-plugin-pyproject; however: Package pybuild-plugin-pyproject is not installed. pbuilder-satisfydepends-dummy depends on python3-all; however: Package python3-all is not installed. pbuilder-satisfydepends-dummy depends on python3-poetry-core; however: Package python3-poetry-core is not installed. pbuilder-satisfydepends-dummy depends on python3-setuptools; however: Package python3-setuptools is not installed. pbuilder-satisfydepends-dummy depends on python3-aiohttp; however: Package python3-aiohttp is not installed. pbuilder-satisfydepends-dummy depends on python3-aioresponses; however: Package python3-aioresponses is not installed. pbuilder-satisfydepends-dummy depends on python3-covdefaults; however: Package python3-covdefaults is not installed. pbuilder-satisfydepends-dummy depends on python3-pytest; however: Package python3-pytest is not installed. pbuilder-satisfydepends-dummy depends on python3-pytest-asyncio; however: Package python3-pytest-asyncio is not installed. pbuilder-satisfydepends-dummy depends on python3-pytest-cov; however: Package python3-pytest-cov is not installed. pbuilder-satisfydepends-dummy depends on python3-syrupy; however: Package python3-syrupy is not installed. pbuilder-satisfydepends-dummy depends on python3-yarl; however: Package python3-yarl is not installed. Setting up pbuilder-satisfydepends-dummy (0.invalid.0) ... Reading package lists... Building dependency tree... Reading state information... Initializing package states... Writing extended state information... Building tag database... pbuilder-satisfydepends-dummy is already installed at the requested version (0.invalid.0) pbuilder-satisfydepends-dummy is already installed at the requested version (0.invalid.0) The following NEW packages will be installed: autoconf{a} automake{a} autopoint{a} autotools-dev{a} bsdextrautils{a} ca-certificates{a} debhelper{a} dh-autoreconf{a} dh-python{a} dh-strip-nondeterminism{a} dwz{a} file{a} gettext{a} gettext-base{a} groff-base{a} intltool-debian{a} jq{a} libarchive-zip-perl{a} libcom-err2{a} libdebhelper-perl{a} libelf1t64{a} libexpat1{a} libfile-stripnondeterminism-perl{a} libgssapi-krb5-2{a} libicu72{a} libjq1{a} libjs-jquery{a} libjs-jquery-hotkeys{a} libjs-jquery-isonscreen{a} libjs-jquery-metadata{a} libjs-jquery-tablesorter{a} libjs-jquery-throttle-debounce{a} libk5crypto3{a} libkeyutils1{a} libkrb5-3{a} libkrb5support0{a} libmagic-mgc{a} libmagic1t64{a} libnsl2{a} libonig5{a} libpipeline1{a} libpython3-stdlib{a} libpython3.12-minimal{a} libpython3.12-stdlib{a} libreadline8t64{a} libtirpc-common{a} libtirpc3t64{a} libtool{a} libuchardet0{a} libxml2{a} m4{a} man-db{a} media-types{a} netbase{a} openssl{a} openstack-pkg-tools{a} po-debconf{a} pybuild-plugin-pyproject{a} python3{a} python3-aiohappyeyeballs{a} python3-aiohttp{a} python3-aioresponses{a} python3-aiosignal{a} python3-all{a} python3-async-generator{a} python3-async-timeout{a} python3-attr{a} python3-autocommand{a} python3-build{a} python3-covdefaults{a} python3-coverage{a} python3-frozenlist{a} python3-idna{a} python3-inflect{a} python3-iniconfig{a} python3-installer{a} python3-jaraco.context{a} python3-jaraco.functools{a} python3-minimal{a} python3-more-itertools{a} python3-multidict{a} python3-packaging{a} python3-pip{a} python3-pkg-resources{a} python3-pluggy{a} python3-poetry-core{a} python3-pyproject-hooks{a} python3-pytest{a} python3-pytest-asyncio{a} python3-pytest-cov{a} python3-setuptools{a} python3-syrupy{a} python3-toml{a} python3-typeguard{a} python3-typing-extensions{a} python3-wheel{a} python3-yarl{a} python3-zipp{a} python3.12{a} python3.12-minimal{a} readline-common{a} sensible-utils{a} tzdata{a} The following packages are RECOMMENDED but will NOT be installed: autopkgtest curl javascript-common krb5-locales libarchive-cpio-perl libjs-sphinxdoc libltdl-dev libmail-sendmail-perl lynx madison-lite pristine-tar python3-aiodns python3-dev python3-pygments wget 0 packages upgraded, 103 newly installed, 0 to remove and 0 not upgraded. Need to get 32.4 MB of archives. After unpacking 124 MB will be used. Writing extended state information... Get: 1 http://deb.debian.org/debian unstable/main armhf libjs-jquery all 3.6.1+dfsg+~3.5.14-1 [326 kB] Get: 2 http://deb.debian.org/debian unstable/main armhf libjs-jquery-hotkeys all 0~20130707+git2d51e3a9+dfsg-2.1 [11.5 kB] Get: 3 http://deb.debian.org/debian unstable/main armhf libpython3.12-minimal armhf 3.12.7-1 [800 kB] Get: 4 http://deb.debian.org/debian unstable/main armhf libexpat1 armhf 2.6.3-1 [83.2 kB] Get: 5 http://deb.debian.org/debian unstable/main armhf python3.12-minimal armhf 3.12.7-1 [1809 kB] Get: 6 http://deb.debian.org/debian unstable/main armhf python3-minimal armhf 3.12.6-1 [26.7 kB] Get: 7 http://deb.debian.org/debian unstable/main armhf media-types all 10.1.0 [26.9 kB] Get: 8 http://deb.debian.org/debian unstable/main armhf netbase all 6.4 [12.8 kB] Get: 9 http://deb.debian.org/debian unstable/main armhf tzdata all 2024b-3 [255 kB] Get: 10 http://deb.debian.org/debian unstable/main armhf libkrb5support0 armhf 1.21.3-3 [30.0 kB] Get: 11 http://deb.debian.org/debian unstable/main armhf libcom-err2 armhf 1.47.1-1 [22.1 kB] Get: 12 http://deb.debian.org/debian unstable/main armhf libk5crypto3 armhf 1.21.3-3 [75.8 kB] Get: 13 http://deb.debian.org/debian unstable/main armhf libkeyutils1 armhf 1.6.3-3 [7908 B] Get: 14 http://deb.debian.org/debian unstable/main armhf libkrb5-3 armhf 1.21.3-3 [283 kB] Get: 15 http://deb.debian.org/debian unstable/main armhf libgssapi-krb5-2 armhf 1.21.3-3 [114 kB] Get: 16 http://deb.debian.org/debian unstable/main armhf libtirpc-common all 1.3.4+ds-1.3 [10.9 kB] Get: 17 http://deb.debian.org/debian unstable/main armhf libtirpc3t64 armhf 1.3.4+ds-1.3 [71.1 kB] Get: 18 http://deb.debian.org/debian unstable/main armhf libnsl2 armhf 1.3.0-3+b2 [34.9 kB] Get: 19 http://deb.debian.org/debian unstable/main armhf readline-common all 8.2-5 [69.3 kB] Get: 20 http://deb.debian.org/debian unstable/main armhf libreadline8t64 armhf 8.2-5 [146 kB] Get: 21 http://deb.debian.org/debian unstable/main armhf libpython3.12-stdlib armhf 3.12.7-1 [1820 kB] Get: 22 http://deb.debian.org/debian unstable/main armhf python3.12 armhf 3.12.7-1 [671 kB] Get: 23 http://deb.debian.org/debian unstable/main armhf libpython3-stdlib armhf 3.12.6-1 [9692 B] Get: 24 http://deb.debian.org/debian unstable/main armhf python3 armhf 3.12.6-1 [27.8 kB] Get: 25 http://deb.debian.org/debian unstable/main armhf sensible-utils all 0.0.24 [24.8 kB] Get: 26 http://deb.debian.org/debian unstable/main armhf openssl armhf 3.3.2-1 [1348 kB] Get: 27 http://deb.debian.org/debian unstable/main armhf ca-certificates all 20240203 [158 kB] Get: 28 http://deb.debian.org/debian unstable/main armhf libmagic-mgc armhf 1:5.45-3 [314 kB] Get: 29 http://deb.debian.org/debian unstable/main armhf libmagic1t64 armhf 1:5.45-3 [98.1 kB] Get: 30 http://deb.debian.org/debian unstable/main armhf file armhf 1:5.45-3 [42.0 kB] Get: 31 http://deb.debian.org/debian unstable/main armhf gettext-base armhf 0.22.5-2 [195 kB] Get: 32 http://deb.debian.org/debian unstable/main armhf libuchardet0 armhf 0.0.8-1+b1 [65.7 kB] Get: 33 http://deb.debian.org/debian unstable/main armhf groff-base armhf 1.23.0-5 [1091 kB] Get: 34 http://deb.debian.org/debian unstable/main armhf bsdextrautils armhf 2.40.2-9 [88.8 kB] Get: 35 http://deb.debian.org/debian unstable/main armhf libpipeline1 armhf 1.5.8-1 [35.0 kB] Get: 36 http://deb.debian.org/debian unstable/main armhf man-db armhf 2.13.0-1 [1382 kB] Get: 37 http://deb.debian.org/debian unstable/main armhf m4 armhf 1.4.19-4 [264 kB] Get: 38 http://deb.debian.org/debian unstable/main armhf autoconf all 2.72-3 [493 kB] Get: 39 http://deb.debian.org/debian unstable/main armhf autotools-dev all 20220109.1 [51.6 kB] Get: 40 http://deb.debian.org/debian unstable/main armhf automake all 1:1.16.5-1.3 [823 kB] Get: 41 http://deb.debian.org/debian unstable/main armhf autopoint all 0.22.5-2 [723 kB] Get: 42 http://deb.debian.org/debian unstable/main armhf libdebhelper-perl all 13.20 [89.7 kB] Get: 43 http://deb.debian.org/debian unstable/main armhf libtool all 2.4.7-7 [517 kB] Get: 44 http://deb.debian.org/debian unstable/main armhf dh-autoreconf all 20 [17.1 kB] Get: 45 http://deb.debian.org/debian unstable/main armhf libarchive-zip-perl all 1.68-1 [104 kB] Get: 46 http://deb.debian.org/debian unstable/main armhf libfile-stripnondeterminism-perl all 1.14.0-1 [19.5 kB] Get: 47 http://deb.debian.org/debian unstable/main armhf dh-strip-nondeterminism all 1.14.0-1 [8448 B] Get: 48 http://deb.debian.org/debian unstable/main armhf libelf1t64 armhf 0.191-2 [183 kB] Get: 49 http://deb.debian.org/debian unstable/main armhf dwz armhf 0.15-1+b2 [106 kB] Get: 50 http://deb.debian.org/debian unstable/main armhf libicu72 armhf 72.1-5 [9075 kB] Get: 51 http://deb.debian.org/debian unstable/main armhf libxml2 armhf 2.12.7+dfsg+really2.9.14-0.1 [604 kB] Get: 52 http://deb.debian.org/debian unstable/main armhf gettext armhf 0.22.5-2 [1485 kB] Get: 53 http://deb.debian.org/debian unstable/main armhf intltool-debian all 0.35.0+20060710.6 [22.9 kB] Get: 54 http://deb.debian.org/debian unstable/main armhf po-debconf all 1.0.21+nmu1 [248 kB] Get: 55 http://deb.debian.org/debian unstable/main armhf debhelper all 13.20 [915 kB] Get: 56 http://deb.debian.org/debian unstable/main armhf python3-autocommand all 2.2.2-3 [13.6 kB] Get: 57 http://deb.debian.org/debian unstable/main armhf python3-more-itertools all 10.5.0-1 [63.8 kB] Get: 58 http://deb.debian.org/debian unstable/main armhf python3-typing-extensions all 4.12.2-2 [73.0 kB] Get: 59 http://deb.debian.org/debian unstable/main armhf python3-typeguard all 4.3.0-1 [36.5 kB] Get: 60 http://deb.debian.org/debian unstable/main armhf python3-inflect all 7.3.1-2 [32.4 kB] Get: 61 http://deb.debian.org/debian unstable/main armhf python3-jaraco.context all 6.0.0-1 [7984 B] Get: 62 http://deb.debian.org/debian unstable/main armhf python3-jaraco.functools all 4.1.0-1 [12.0 kB] Get: 63 http://deb.debian.org/debian unstable/main armhf python3-pkg-resources all 74.1.2-2 [213 kB] Get: 64 http://deb.debian.org/debian unstable/main armhf python3-zipp all 3.20.2-1 [10.3 kB] Get: 65 http://deb.debian.org/debian unstable/main armhf python3-setuptools all 74.1.2-2 [736 kB] Get: 66 http://deb.debian.org/debian unstable/main armhf dh-python all 6.20240824 [109 kB] Get: 67 http://deb.debian.org/debian unstable/main armhf libonig5 armhf 6.9.9-1 [167 kB] Get: 68 http://deb.debian.org/debian unstable/main armhf libjq1 armhf 1.7.1-3 [155 kB] Get: 69 http://deb.debian.org/debian unstable/main armhf jq armhf 1.7.1-3 [77.4 kB] Get: 70 http://deb.debian.org/debian unstable/main armhf libjs-jquery-isonscreen all 1.2.0-1.1 [3196 B] Get: 71 http://deb.debian.org/debian unstable/main armhf libjs-jquery-metadata all 12-4 [6532 B] Get: 72 http://deb.debian.org/debian unstable/main armhf libjs-jquery-tablesorter all 1:2.31.3+dfsg1-4 [184 kB] Get: 73 http://deb.debian.org/debian unstable/main armhf libjs-jquery-throttle-debounce all 1.1+dfsg.1-2 [12.2 kB] Get: 74 http://deb.debian.org/debian unstable/main armhf python3-wheel all 0.44.0-2 [53.4 kB] Get: 75 http://deb.debian.org/debian unstable/main armhf python3-pip all 24.2+dfsg-1 [1434 kB] Get: 76 http://deb.debian.org/debian unstable/main armhf openstack-pkg-tools all 130 [96.4 kB] Get: 77 http://deb.debian.org/debian unstable/main armhf python3-packaging all 24.1-1 [45.8 kB] Get: 78 http://deb.debian.org/debian unstable/main armhf python3-pyproject-hooks all 1.1.0-2 [11.3 kB] Get: 79 http://deb.debian.org/debian unstable/main armhf python3-toml all 0.10.2-1 [16.2 kB] Get: 80 http://deb.debian.org/debian unstable/main armhf python3-build all 1.2.2-1 [36.0 kB] Get: 81 http://deb.debian.org/debian unstable/main armhf python3-installer all 0.7.0+dfsg1-3 [18.6 kB] Get: 82 http://deb.debian.org/debian unstable/main armhf pybuild-plugin-pyproject all 6.20240824 [11.2 kB] Get: 83 http://deb.debian.org/debian unstable/main armhf python3-aiohappyeyeballs all 2.4.3-1 [13.3 kB] Get: 84 http://deb.debian.org/debian unstable/main armhf python3-idna all 3.8-2 [41.6 kB] Get: 85 http://deb.debian.org/debian unstable/main armhf python3-multidict armhf 6.1.0-1 [33.9 kB] Get: 86 http://deb.debian.org/debian unstable/main armhf python3-yarl armhf 1.13.1-1 [91.6 kB] Get: 87 http://deb.debian.org/debian unstable/main armhf python3-async-timeout all 4.0.3-1 [7660 B] Get: 88 http://deb.debian.org/debian unstable/main armhf python3-frozenlist armhf 1.4.1-1 [41.6 kB] Get: 89 http://deb.debian.org/debian unstable/main armhf python3-aiosignal all 1.3.1-1 [6016 B] Get: 90 http://deb.debian.org/debian unstable/main armhf python3-attr all 24.2.0-1 [68.4 kB] Get: 91 http://deb.debian.org/debian unstable/main armhf python3-aiohttp armhf 3.10.8-1 [295 kB] Get: 92 http://deb.debian.org/debian unstable/main armhf python3-aioresponses all 0.7.6-2 [10.9 kB] Get: 93 http://deb.debian.org/debian unstable/main armhf python3-all armhf 3.12.6-1 [1040 B] Get: 94 http://deb.debian.org/debian unstable/main armhf python3-async-generator all 1.10-4 [17.4 kB] Get: 95 http://deb.debian.org/debian unstable/main armhf python3-coverage armhf 7.6.0+dfsg1-1 [173 kB] Get: 96 http://deb.debian.org/debian unstable/main armhf python3-covdefaults all 2.3.0-2 [7692 B] Get: 97 http://deb.debian.org/debian unstable/main armhf python3-iniconfig all 1.1.1-2 [6396 B] Get: 98 http://deb.debian.org/debian unstable/main armhf python3-pluggy all 1.5.0-1 [26.9 kB] Get: 99 http://deb.debian.org/debian unstable/main armhf python3-poetry-core all 1.9.0-2 [210 kB] Get: 100 http://deb.debian.org/debian unstable/main armhf python3-pytest all 8.3.3-1 [249 kB] Get: 101 http://deb.debian.org/debian unstable/main armhf python3-pytest-asyncio all 0.24.0a1-1 [15.6 kB] Get: 102 http://deb.debian.org/debian unstable/main armhf python3-pytest-cov all 5.0.0-1 [26.8 kB] Get: 103 http://deb.debian.org/debian unstable/main armhf python3-syrupy all 4.7.2-1 [53.0 kB] Fetched 32.4 MB in 3s (10.3 MB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libjs-jquery. (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 ... 21597 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:armhf. Preparing to unpack .../libpython3.12-minimal_3.12.7-1_armhf.deb ... Unpacking libpython3.12-minimal:armhf (3.12.7-1) ... Selecting previously unselected package libexpat1:armhf. Preparing to unpack .../libexpat1_2.6.3-1_armhf.deb ... Unpacking libexpat1:armhf (2.6.3-1) ... Selecting previously unselected package python3.12-minimal. Preparing to unpack .../python3.12-minimal_3.12.7-1_armhf.deb ... Unpacking python3.12-minimal (3.12.7-1) ... Setting up libpython3.12-minimal:armhf (3.12.7-1) ... Setting up libexpat1:armhf (2.6.3-1) ... Setting up python3.12-minimal (3.12.7-1) ... Selecting previously unselected package python3-minimal. (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 ... 21943 files and directories currently installed.) Preparing to unpack .../00-python3-minimal_3.12.6-1_armhf.deb ... Unpacking python3-minimal (3.12.6-1) ... Selecting previously unselected package media-types. Preparing to unpack .../01-media-types_10.1.0_all.deb ... Unpacking media-types (10.1.0) ... Selecting previously unselected package netbase. Preparing to unpack .../02-netbase_6.4_all.deb ... Unpacking netbase (6.4) ... Selecting previously unselected package tzdata. Preparing to unpack .../03-tzdata_2024b-3_all.deb ... Unpacking tzdata (2024b-3) ... Selecting previously unselected package libkrb5support0:armhf. Preparing to unpack .../04-libkrb5support0_1.21.3-3_armhf.deb ... Unpacking libkrb5support0:armhf (1.21.3-3) ... Selecting previously unselected package libcom-err2:armhf. Preparing to unpack .../05-libcom-err2_1.47.1-1_armhf.deb ... Unpacking libcom-err2:armhf (1.47.1-1) ... Selecting previously unselected package libk5crypto3:armhf. Preparing to unpack .../06-libk5crypto3_1.21.3-3_armhf.deb ... Unpacking libk5crypto3:armhf (1.21.3-3) ... Selecting previously unselected package libkeyutils1:armhf. Preparing to unpack .../07-libkeyutils1_1.6.3-3_armhf.deb ... Unpacking libkeyutils1:armhf (1.6.3-3) ... Selecting previously unselected package libkrb5-3:armhf. Preparing to unpack .../08-libkrb5-3_1.21.3-3_armhf.deb ... Unpacking libkrb5-3:armhf (1.21.3-3) ... Selecting previously unselected package libgssapi-krb5-2:armhf. Preparing to unpack .../09-libgssapi-krb5-2_1.21.3-3_armhf.deb ... Unpacking libgssapi-krb5-2:armhf (1.21.3-3) ... Selecting previously unselected package libtirpc-common. Preparing to unpack .../10-libtirpc-common_1.3.4+ds-1.3_all.deb ... Unpacking libtirpc-common (1.3.4+ds-1.3) ... Selecting previously unselected package libtirpc3t64:armhf. Preparing to unpack .../11-libtirpc3t64_1.3.4+ds-1.3_armhf.deb ... Adding 'diversion of /lib/arm-linux-gnueabihf/libtirpc.so.3 to /lib/arm-linux-gnueabihf/libtirpc.so.3.usr-is-merged by libtirpc3t64' Adding 'diversion of /lib/arm-linux-gnueabihf/libtirpc.so.3.0.0 to /lib/arm-linux-gnueabihf/libtirpc.so.3.0.0.usr-is-merged by libtirpc3t64' Unpacking libtirpc3t64:armhf (1.3.4+ds-1.3) ... Selecting previously unselected package libnsl2:armhf. Preparing to unpack .../12-libnsl2_1.3.0-3+b2_armhf.deb ... Unpacking libnsl2:armhf (1.3.0-3+b2) ... Selecting previously unselected package readline-common. Preparing to unpack .../13-readline-common_8.2-5_all.deb ... Unpacking readline-common (8.2-5) ... Selecting previously unselected package libreadline8t64:armhf. Preparing to unpack .../14-libreadline8t64_8.2-5_armhf.deb ... Adding 'diversion of /lib/arm-linux-gnueabihf/libhistory.so.8 to /lib/arm-linux-gnueabihf/libhistory.so.8.usr-is-merged by libreadline8t64' Adding 'diversion of /lib/arm-linux-gnueabihf/libhistory.so.8.2 to /lib/arm-linux-gnueabihf/libhistory.so.8.2.usr-is-merged by libreadline8t64' Adding 'diversion of /lib/arm-linux-gnueabihf/libreadline.so.8 to /lib/arm-linux-gnueabihf/libreadline.so.8.usr-is-merged by libreadline8t64' Adding 'diversion of /lib/arm-linux-gnueabihf/libreadline.so.8.2 to /lib/arm-linux-gnueabihf/libreadline.so.8.2.usr-is-merged by libreadline8t64' Unpacking libreadline8t64:armhf (8.2-5) ... Selecting previously unselected package libpython3.12-stdlib:armhf. Preparing to unpack .../15-libpython3.12-stdlib_3.12.7-1_armhf.deb ... Unpacking libpython3.12-stdlib:armhf (3.12.7-1) ... Selecting previously unselected package python3.12. Preparing to unpack .../16-python3.12_3.12.7-1_armhf.deb ... Unpacking python3.12 (3.12.7-1) ... Selecting previously unselected package libpython3-stdlib:armhf. Preparing to unpack .../17-libpython3-stdlib_3.12.6-1_armhf.deb ... Unpacking libpython3-stdlib:armhf (3.12.6-1) ... Setting up python3-minimal (3.12.6-1) ... Selecting previously unselected package python3. (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 ... 23003 files and directories currently installed.) Preparing to unpack .../00-python3_3.12.6-1_armhf.deb ... Unpacking python3 (3.12.6-1) ... Selecting previously unselected package sensible-utils. Preparing to unpack .../01-sensible-utils_0.0.24_all.deb ... Unpacking sensible-utils (0.0.24) ... Selecting previously unselected package openssl. Preparing to unpack .../02-openssl_3.3.2-1_armhf.deb ... Unpacking openssl (3.3.2-1) ... Selecting previously unselected package ca-certificates. Preparing to unpack .../03-ca-certificates_20240203_all.deb ... Unpacking ca-certificates (20240203) ... Selecting previously unselected package libmagic-mgc. Preparing to unpack .../04-libmagic-mgc_1%3a5.45-3_armhf.deb ... Unpacking libmagic-mgc (1:5.45-3) ... Selecting previously unselected package libmagic1t64:armhf. Preparing to unpack .../05-libmagic1t64_1%3a5.45-3_armhf.deb ... Unpacking libmagic1t64:armhf (1:5.45-3) ... Selecting previously unselected package file. Preparing to unpack .../06-file_1%3a5.45-3_armhf.deb ... Unpacking file (1:5.45-3) ... Selecting previously unselected package gettext-base. Preparing to unpack .../07-gettext-base_0.22.5-2_armhf.deb ... Unpacking gettext-base (0.22.5-2) ... Selecting previously unselected package libuchardet0:armhf. Preparing to unpack .../08-libuchardet0_0.0.8-1+b1_armhf.deb ... Unpacking libuchardet0:armhf (0.0.8-1+b1) ... Selecting previously unselected package groff-base. Preparing to unpack .../09-groff-base_1.23.0-5_armhf.deb ... Unpacking groff-base (1.23.0-5) ... Selecting previously unselected package bsdextrautils. Preparing to unpack .../10-bsdextrautils_2.40.2-9_armhf.deb ... Unpacking bsdextrautils (2.40.2-9) ... Selecting previously unselected package libpipeline1:armhf. Preparing to unpack .../11-libpipeline1_1.5.8-1_armhf.deb ... Unpacking libpipeline1:armhf (1.5.8-1) ... Selecting previously unselected package man-db. Preparing to unpack .../12-man-db_2.13.0-1_armhf.deb ... Unpacking man-db (2.13.0-1) ... Selecting previously unselected package m4. Preparing to unpack .../13-m4_1.4.19-4_armhf.deb ... Unpacking m4 (1.4.19-4) ... Selecting previously unselected package autoconf. Preparing to unpack .../14-autoconf_2.72-3_all.deb ... Unpacking autoconf (2.72-3) ... Selecting previously unselected package autotools-dev. Preparing to unpack .../15-autotools-dev_20220109.1_all.deb ... Unpacking autotools-dev (20220109.1) ... Selecting previously unselected package automake. Preparing to unpack .../16-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 .../17-autopoint_0.22.5-2_all.deb ... Unpacking autopoint (0.22.5-2) ... Selecting previously unselected package libdebhelper-perl. Preparing to unpack .../18-libdebhelper-perl_13.20_all.deb ... Unpacking libdebhelper-perl (13.20) ... Selecting previously unselected package libtool. Preparing to unpack .../19-libtool_2.4.7-7_all.deb ... Unpacking libtool (2.4.7-7) ... Selecting previously unselected package dh-autoreconf. Preparing to unpack .../20-dh-autoreconf_20_all.deb ... Unpacking dh-autoreconf (20) ... Selecting previously unselected package libarchive-zip-perl. Preparing to unpack .../21-libarchive-zip-perl_1.68-1_all.deb ... Unpacking libarchive-zip-perl (1.68-1) ... Selecting previously unselected package libfile-stripnondeterminism-perl. Preparing to unpack .../22-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 .../23-dh-strip-nondeterminism_1.14.0-1_all.deb ... Unpacking dh-strip-nondeterminism (1.14.0-1) ... Selecting previously unselected package libelf1t64:armhf. Preparing to unpack .../24-libelf1t64_0.191-2_armhf.deb ... Unpacking libelf1t64:armhf (0.191-2) ... Selecting previously unselected package dwz. Preparing to unpack .../25-dwz_0.15-1+b2_armhf.deb ... Unpacking dwz (0.15-1+b2) ... Selecting previously unselected package libicu72:armhf. Preparing to unpack .../26-libicu72_72.1-5_armhf.deb ... Unpacking libicu72:armhf (72.1-5) ... Selecting previously unselected package libxml2:armhf. Preparing to unpack .../27-libxml2_2.12.7+dfsg+really2.9.14-0.1_armhf.deb ... Unpacking libxml2:armhf (2.12.7+dfsg+really2.9.14-0.1) ... Selecting previously unselected package gettext. Preparing to unpack .../28-gettext_0.22.5-2_armhf.deb ... Unpacking gettext (0.22.5-2) ... Selecting previously unselected package intltool-debian. Preparing to unpack .../29-intltool-debian_0.35.0+20060710.6_all.deb ... Unpacking intltool-debian (0.35.0+20060710.6) ... Selecting previously unselected package po-debconf. Preparing to unpack .../30-po-debconf_1.0.21+nmu1_all.deb ... Unpacking po-debconf (1.0.21+nmu1) ... Selecting previously unselected package debhelper. Preparing to unpack .../31-debhelper_13.20_all.deb ... Unpacking debhelper (13.20) ... Selecting previously unselected package python3-autocommand. Preparing to unpack .../32-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 .../33-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 .../34-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 .../35-python3-typeguard_4.3.0-1_all.deb ... Unpacking python3-typeguard (4.3.0-1) ... Selecting previously unselected package python3-inflect. Preparing to unpack .../36-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 .../37-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 .../38-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 .../39-python3-pkg-resources_74.1.2-2_all.deb ... Unpacking python3-pkg-resources (74.1.2-2) ... Selecting previously unselected package python3-zipp. Preparing to unpack .../40-python3-zipp_3.20.2-1_all.deb ... Unpacking python3-zipp (3.20.2-1) ... Selecting previously unselected package python3-setuptools. Preparing to unpack .../41-python3-setuptools_74.1.2-2_all.deb ... Unpacking python3-setuptools (74.1.2-2) ... Selecting previously unselected package dh-python. Preparing to unpack .../42-dh-python_6.20240824_all.deb ... Unpacking dh-python (6.20240824) ... Selecting previously unselected package libonig5:armhf. Preparing to unpack .../43-libonig5_6.9.9-1_armhf.deb ... Unpacking libonig5:armhf (6.9.9-1) ... Selecting previously unselected package libjq1:armhf. Preparing to unpack .../44-libjq1_1.7.1-3_armhf.deb ... Unpacking libjq1:armhf (1.7.1-3) ... Selecting previously unselected package jq. Preparing to unpack .../45-jq_1.7.1-3_armhf.deb ... Unpacking jq (1.7.1-3) ... Selecting previously unselected package libjs-jquery-isonscreen. Preparing to unpack .../46-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 .../47-libjs-jquery-metadata_12-4_all.deb ... Unpacking libjs-jquery-metadata (12-4) ... Selecting previously unselected package libjs-jquery-tablesorter. Preparing to unpack .../48-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 .../49-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 python3-wheel. Preparing to unpack .../50-python3-wheel_0.44.0-2_all.deb ... Unpacking python3-wheel (0.44.0-2) ... Selecting previously unselected package python3-pip. Preparing to unpack .../51-python3-pip_24.2+dfsg-1_all.deb ... Unpacking python3-pip (24.2+dfsg-1) ... Selecting previously unselected package openstack-pkg-tools. Preparing to unpack .../52-openstack-pkg-tools_130_all.deb ... Unpacking openstack-pkg-tools (130) ... Selecting previously unselected package python3-packaging. Preparing to unpack .../53-python3-packaging_24.1-1_all.deb ... Unpacking python3-packaging (24.1-1) ... Selecting previously unselected package python3-pyproject-hooks. Preparing to unpack .../54-python3-pyproject-hooks_1.1.0-2_all.deb ... Unpacking python3-pyproject-hooks (1.1.0-2) ... Selecting previously unselected package python3-toml. Preparing to unpack .../55-python3-toml_0.10.2-1_all.deb ... Unpacking python3-toml (0.10.2-1) ... Selecting previously unselected package python3-build. Preparing to unpack .../56-python3-build_1.2.2-1_all.deb ... Unpacking python3-build (1.2.2-1) ... Selecting previously unselected package python3-installer. Preparing to unpack .../57-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 .../58-pybuild-plugin-pyproject_6.20240824_all.deb ... Unpacking pybuild-plugin-pyproject (6.20240824) ... Selecting previously unselected package python3-aiohappyeyeballs. Preparing to unpack .../59-python3-aiohappyeyeballs_2.4.3-1_all.deb ... Unpacking python3-aiohappyeyeballs (2.4.3-1) ... Selecting previously unselected package python3-idna. Preparing to unpack .../60-python3-idna_3.8-2_all.deb ... Unpacking python3-idna (3.8-2) ... Selecting previously unselected package python3-multidict. Preparing to unpack .../61-python3-multidict_6.1.0-1_armhf.deb ... Unpacking python3-multidict (6.1.0-1) ... Selecting previously unselected package python3-yarl. Preparing to unpack .../62-python3-yarl_1.13.1-1_armhf.deb ... Unpacking python3-yarl (1.13.1-1) ... Selecting previously unselected package python3-async-timeout. Preparing to unpack .../63-python3-async-timeout_4.0.3-1_all.deb ... Unpacking python3-async-timeout (4.0.3-1) ... Selecting previously unselected package python3-frozenlist. Preparing to unpack .../64-python3-frozenlist_1.4.1-1_armhf.deb ... Unpacking python3-frozenlist (1.4.1-1) ... Selecting previously unselected package python3-aiosignal. Preparing to unpack .../65-python3-aiosignal_1.3.1-1_all.deb ... Unpacking python3-aiosignal (1.3.1-1) ... Selecting previously unselected package python3-attr. Preparing to unpack .../66-python3-attr_24.2.0-1_all.deb ... Unpacking python3-attr (24.2.0-1) ... Selecting previously unselected package python3-aiohttp. Preparing to unpack .../67-python3-aiohttp_3.10.8-1_armhf.deb ... Unpacking python3-aiohttp (3.10.8-1) ... Selecting previously unselected package python3-aioresponses. Preparing to unpack .../68-python3-aioresponses_0.7.6-2_all.deb ... Unpacking python3-aioresponses (0.7.6-2) ... Selecting previously unselected package python3-all. Preparing to unpack .../69-python3-all_3.12.6-1_armhf.deb ... Unpacking python3-all (3.12.6-1) ... Selecting previously unselected package python3-async-generator. Preparing to unpack .../70-python3-async-generator_1.10-4_all.deb ... Unpacking python3-async-generator (1.10-4) ... Selecting previously unselected package python3-coverage. Preparing to unpack .../71-python3-coverage_7.6.0+dfsg1-1_armhf.deb ... Unpacking python3-coverage (7.6.0+dfsg1-1) ... Selecting previously unselected package python3-covdefaults. Preparing to unpack .../72-python3-covdefaults_2.3.0-2_all.deb ... Unpacking python3-covdefaults (2.3.0-2) ... Selecting previously unselected package python3-iniconfig. Preparing to unpack .../73-python3-iniconfig_1.1.1-2_all.deb ... Unpacking python3-iniconfig (1.1.1-2) ... Selecting previously unselected package python3-pluggy. Preparing to unpack .../74-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 .../75-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 .../76-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 .../77-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 .../78-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 .../79-python3-syrupy_4.7.2-1_all.deb ... Unpacking python3-syrupy (4.7.2-1) ... Setting up media-types (10.1.0) ... Setting up libpipeline1:armhf (1.5.8-1) ... Setting up libkeyutils1:armhf (1.6.3-3) ... Setting up libicu72:armhf (72.1-5) ... Setting up bsdextrautils (2.40.2-9) ... Setting up libmagic-mgc (1:5.45-3) ... Setting up libarchive-zip-perl (1.68-1) ... Setting up libtirpc-common (1.3.4+ds-1.3) ... Setting up libdebhelper-perl (13.20) ... Setting up libmagic1t64:armhf (1:5.45-3) ... Setting up gettext-base (0.22.5-2) ... Setting up m4 (1.4.19-4) ... Setting up libcom-err2:armhf (1.47.1-1) ... Setting up file (1:5.45-3) ... Setting up libjs-jquery-throttle-debounce (1.1+dfsg.1-2) ... Setting up libelf1t64:armhf (0.191-2) ... Setting up libkrb5support0:armhf (1.21.3-3) ... Setting up tzdata (2024b-3) ... Current default time zone: 'Etc/UTC' Local time is now: Tue Oct 15 04:34:37 UTC 2024. Universal Time is now: Tue Oct 15 04:34:37 UTC 2024. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up autotools-dev (20220109.1) ... Setting up autopoint (0.22.5-2) ... Setting up libk5crypto3:armhf (1.21.3-3) ... Setting up autoconf (2.72-3) ... Setting up dwz (0.15-1+b2) ... Setting up sensible-utils (0.0.24) ... Setting up libuchardet0:armhf (0.0.8-1+b1) ... Setting up netbase (6.4) ... Setting up libkrb5-3:armhf (1.21.3-3) ... 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 openssl (3.3.2-1) ... Setting up readline-common (8.2-5) ... Setting up libxml2:armhf (2.12.7+dfsg+really2.9.14-0.1) ... Setting up libonig5:armhf (6.9.9-1) ... 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 libfile-stripnondeterminism-perl (1.14.0-1) ... Setting up gettext (0.22.5-2) ... Setting up libtool (2.4.7-7) ... Setting up libjq1:armhf (1.7.1-3) ... Setting up intltool-debian (0.35.0+20060710.6) ... Setting up dh-autoreconf (20) ... Setting up ca-certificates (20240203) ... Updating certificates in /etc/ssl/certs... 146 added, 0 removed; done. Setting up libjs-jquery-metadata (12-4) ... Setting up libjs-jquery-isonscreen (1.2.0-1.1) ... Setting up libgssapi-krb5-2:armhf (1.21.3-3) ... Setting up libreadline8t64:armhf (8.2-5) ... Setting up dh-strip-nondeterminism (1.14.0-1) ... Setting up libjs-jquery-tablesorter (1:2.31.3+dfsg1-4) ... Setting up groff-base (1.23.0-5) ... Setting up jq (1.7.1-3) ... Setting up libtirpc3t64:armhf (1.3.4+ds-1.3) ... Setting up po-debconf (1.0.21+nmu1) ... Setting up man-db (2.13.0-1) ... Not building database; man-db/auto-update is not 'true'. Setting up libnsl2:armhf (1.3.0-3+b2) ... Setting up libpython3.12-stdlib:armhf (3.12.7-1) ... Setting up python3.12 (3.12.7-1) ... Setting up debhelper (13.20) ... Setting up libpython3-stdlib:armhf (3.12.6-1) ... Setting up python3 (3.12.6-1) ... Setting up python3-zipp (3.20.2-1) ... Setting up python3-autocommand (2.2.2-3) ... Setting up python3-wheel (0.44.0-2) ... Setting up python3-multidict (6.1.0-1) ... Setting up python3-frozenlist (1.4.1-1) ... Setting up python3-aiosignal (1.3.1-1) ... Setting up python3-async-timeout (4.0.3-1) ... Setting up python3-packaging (24.1-1) ... Setting up python3-pyproject-hooks (1.1.0-2) ... 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.2+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 python3-build (1.2.2-1) ... Setting up python3-yarl (1.13.1-1) ... 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 python3-pytest (8.3.3-1) ... Setting up python3-syrupy (4.7.2-1) ... Setting up python3-typeguard (4.3.0-1) ... Setting up python3-aiohttp (3.10.8-1) ... Setting up python3-all (3.12.6-1) ... Setting up openstack-pkg-tools (130) ... Setting up python3-inflect (7.3.1-2) ... Setting up python3-pytest-asyncio (0.24.0a1-1) ... Setting up python3-pkg-resources (74.1.2-2) ... Setting up python3-aioresponses (0.7.6-2) ... Setting up python3-setuptools (74.1.2-2) ... Setting up python3-coverage (7.6.0+dfsg1-1) ... Setting up python3-pytest-cov (5.0.0-1) ... Setting up dh-python (6.20240824) ... Setting up pybuild-plugin-pyproject (6.20240824) ... Setting up python3-covdefaults (2.3.0-2) ... Processing triggers for libc-bin (2.40-3) ... Processing triggers for ca-certificates (20240203) ... Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done. Reading package lists... Building dependency tree... Reading state information... Reading extended state information... Initializing package states... Writing extended state information... Building tag database... -> Finished parsing the build-deps Reading package lists... Building dependency tree... Reading state information... fakeroot is already the newest version (1.36-1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. I: Building the package I: Running cd /build/reproducible-path/python-aiowithings-3.0.3/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../python-aiowithings_3.0.3-2_source.changes 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 dpkg-source --before-build . dpkg-buildpackage: info: host architecture armhf dpkg-source: info: using options from python-aiowithings-3.0.3/debian/source/options: --extend-diff-ignore=^[^/]*[.]egg-info/ fakeroot 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 build make: pyversions: No such file or directory py3versions: no X-Python3-Version in control file, using supported versions dh build --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.12 with "build" module I: pybuild base:311: python3.12 -m build --skip-dependency-check --no-isolation --wheel --outdir /build/reproducible-path/python-aiowithings-3.0.3/.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 /build/reproducible-path/python-aiowithings-3.0.3/.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: /build/reproducible-path/python-aiowithings-3.0.3/.pybuild/cpython3_3.12/build configfile: pyproject.toml plugins: asyncio-0.24.0a1, syrupy-4.7.2, typeguard-4.3.0, cov-5.0.0 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 = 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 = orig_self = , 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 = 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 = orig_self = , 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 = authenticated_client = WithingsClient(session=, 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 = orig_self = , 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 = 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 = orig_self = , 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 = authenticated_client = WithingsClient(session=, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None) status = 100 error = @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 = orig_self = , 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 = authenticated_client = WithingsClient(session=, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None) status = 201 error = @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 = orig_self = , 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 = authenticated_client = WithingsClient(session=, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None) status = 214, error = @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 = orig_self = , 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 = authenticated_client = WithingsClient(session=, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None) status = 215 error = @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 = orig_self = , 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 = authenticated_client = WithingsClient(session=, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None) status = 522, error = @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 = orig_self = , 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 = authenticated_client = WithingsClient(session=, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None) status = 524, error = @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 = orig_self = , 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 = authenticated_client = WithingsClient(session=, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None) status = 601 error = @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 = orig_self = , 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 = authenticated_client = WithingsClient(session=, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None) status = -1, error = @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 = orig_self = , 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 = authenticated_client = WithingsClient(session=, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None) status = None error = @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 = orig_self = , 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 = snapshot = SnapshotAssertion(name='snapshot', num_executions=0) authenticated_client = WithingsClient(session=, 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 = orig_self = , 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 = snapshot = SnapshotAssertion(name='snapshot', num_executions=0) authenticated_client = WithingsClient(session=, 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 = orig_self = , 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 = snapshot = SnapshotAssertion(name='snapshot', num_executions=0) authenticated_client = WithingsClient(session=, 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 = orig_self = , 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 = snapshot = SnapshotAssertion(name='snapshot', num_executions=0) authenticated_client = WithingsClient(session=, request_timeout=10, api_host='wbsapi.withings.net', _token='test', _close_session=False, refresh_token_function=None) caplog = <_pytest.logging.LogCaptureFixture object at 0xf65705b8> 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 = orig_self = , 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 = snapshot = SnapshotAssertion(name='snapshot', num_executions=0) authenticated_client = WithingsClient(session=, 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 = orig_self = , 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 = snapshot = SnapshotAssertion(name='snapshot', num_executions=0) authenticated_client = WithingsClient(session=, 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 = orig_self = , 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 = snapshot = SnapshotAssertion(name='snapshot', num_executions=0) authenticated_client = WithingsClient(session=, 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 = orig_self = , 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 = snapshot = SnapshotAssertion(name='snapshot', num_executions=0) authenticated_client = WithingsClient(session=, 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 = orig_self = , 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 = snapshot = SnapshotAssertion(name='snapshot', num_executions=0) authenticated_client = WithingsClient(session=, 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 = orig_self = , 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 = snapshot = SnapshotAssertion(name='snapshot', num_executions=0) authenticated_client = WithingsClient(session=, 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 = orig_self = , 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 = authenticated_client = WithingsClient(session=, 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 = orig_self = , method = 'POST' url = URL('https://wbsapi.withings.net/notify'), args = () kwargs = {'data': {'action': 'subscribe', 'appli': , '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': }, '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 = authenticated_client = WithingsClient(session=, 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 = orig_self = , method = 'POST' url = URL('https://wbsapi.withings.net/notify'), args = () kwargs = {'data': {'action': 'revoke', 'appli': , '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': }, '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 = snapshot = SnapshotAssertion(name='snapshot', num_executions=0) authenticated_client = WithingsClient(session=, 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 = orig_self = , method = 'POST' url = URL('https://wbsapi.withings.net/notify'), args = () kwargs = {'data': {'action': 'list', 'appli': }, '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': }, '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 = authenticated_client = WithingsClient(session=, 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 = orig_self = , 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 = snapshot = SnapshotAssertion(name='snapshot', num_executions=0) authenticated_client = WithingsClient(session=, 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 = orig_self = , 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 = snapshot = SnapshotAssertion(name='snapshot', num_executions=0) authenticated_client = WithingsClient(session=, 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 = orig_self = , 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 = snapshot = SnapshotAssertion(name='snapshot', num_executions=0) authenticated_client = WithingsClient(session=, 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 = orig_self = , 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 = snapshot = SnapshotAssertion(name='snapshot', num_executions=0) authenticated_client = WithingsClient(session=, 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 = orig_self = , 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 = authenticated_client = WithingsClient(session=, 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 = orig_self = , 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 = authenticated_client = WithingsClient(session=, 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 = orig_self = , 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 = snapshot = SnapshotAssertion(name='snapshot', num_executions=0) authenticated_client = WithingsClient(session=, 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 = orig_self = , 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 = snapshot = SnapshotAssertion(name='snapshot', num_executions=0) authenticated_client = WithingsClient(session=, 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 = orig_self = , 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 49.84s ======================== E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /build/reproducible-path/python-aiowithings-3.0.3/.pybuild/cpython3_3.12/build; python3.12 -m pytest -v tests dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.12 returned exit code 13 make: *** [debian/rules:9: build] Error 25 dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 I: copying local configuration E: Failed autobuilding of package I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env I: removing directory /srv/workspace/pbuilder/21743 and its subdirectories Tue Oct 15 04:37:16 UTC 2024 W: No second build log, what happened?