Skip to content

Incompatibility with gotify-server 2.9.0 #6

@doronbehar

Description

@doronbehar

Hello, the following test failures appear with gotify-server 2.9.0:

============================= test session starts ==============================
platform linux -- Python 3.13.11, pytest-8.4.2, pluggy-1.6.0
rootdir: /build/source
configfile: pyproject.toml
testpaths: tests
plugins: asyncio-1.3.0, typeguard-4.4.4, anyio-4.12.1
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collected 55 items                                                             

tests/test_async_gotify.py .....FFFFF..FF..............                  [ 50%]
tests/test_gotify.py .....FFFFF..FF.............                         [100%]

=================================== FAILURES ===================================
_____________________ TestAsyncGotify.test_get_application _____________________
tests/test_async_gotify.py:67: in test_get_application
    check_type(r, List[Application])
/nix/store/x6bnxvn358dahzi1h1vz6g5312drskj1-python3.13-typeguard-4.4.4/lib/python3.13/site-packages/typeguard/_functions.py:107: in check_type
    check_type_internal(value, expected_type, memo)
/nix/store/x6bnxvn358dahzi1h1vz6g5312drskj1-python3.13-typeguard-4.4.4/lib/python3.13/site-packages/typeguard/_checkers.py:960: in check_type_internal
    checker(value, origin_type, args, memo)
/nix/store/x6bnxvn358dahzi1h1vz6g5312drskj1-python3.13-typeguard-4.4.4/lib/python3.13/site-packages/typeguard/_checkers.py:301: in check_list
    check_type_internal(v, args[0], memo)
/nix/store/x6bnxvn358dahzi1h1vz6g5312drskj1-python3.13-typeguard-4.4.4/lib/python3.13/site-packages/typeguard/_checkers.py:960: in check_type_internal
    checker(value, origin_type, args, memo)
/nix/store/x6bnxvn358dahzi1h1vz6g5312drskj1-python3.13-typeguard-4.4.4/lib/python3.13/site-packages/typeguard/_checkers.py:259: in check_typed_dict
    raise TypeCheckError(f"has unexpected extra key(s): {keys_formatted}")
E   typeguard.TypeCheckError: item 0 of list has unexpected extra key(s): "sortKey"
___________________ TestAsyncGotify.test_create_application ____________________
tests/test_async_gotify.py:71: in test_create_application
    check_type(deepcopy(r1), Application)
/nix/store/x6bnxvn358dahzi1h1vz6g5312drskj1-python3.13-typeguard-4.4.4/lib/python3.13/site-packages/typeguard/_functions.py:107: in check_type
    check_type_internal(value, expected_type, memo)
/nix/store/x6bnxvn358dahzi1h1vz6g5312drskj1-python3.13-typeguard-4.4.4/lib/python3.13/site-packages/typeguard/_checkers.py:960: in check_type_internal
    checker(value, origin_type, args, memo)
/nix/store/x6bnxvn358dahzi1h1vz6g5312drskj1-python3.13-typeguard-4.4.4/lib/python3.13/site-packages/typeguard/_checkers.py:259: in check_typed_dict
    raise TypeCheckError(f"has unexpected extra key(s): {keys_formatted}")
E   typeguard.TypeCheckError: dict has unexpected extra key(s): "sortKey"
___________________ TestAsyncGotify.test_update_application ____________________
tests/test_async_gotify.py:90: in test_update_application
    self.data["app-id"],
    ^^^^^^^^^^^^^^^^^^^
E   KeyError: 'app-id'
________________ TestAsyncGotify.test_upload_application_image _________________
tests/test_async_gotify.py:102: in test_upload_application_image
    r = await agf.upload_application_image(self.data["app-id"], f)
                                           ^^^^^^^^^^^^^^^^^^^
E   KeyError: 'app-id'
______________________ TestAsyncGotify.test_get_messages _______________________
tests/test_async_gotify.py:107: in test_get_messages
    r1 = await agf.get_messages(self.data["app-id"])
                                ^^^^^^^^^^^^^^^^^^^
E   KeyError: 'app-id'
_____________________ TestAsyncGotify.test_delete_messages _____________________
tests/test_async_gotify.py:131: in test_delete_messages
    r1 = await agf.delete_messages(self.data["app-id"])
                                   ^^^^^^^^^^^^^^^^^^^
E   KeyError: 'app-id'
___________________ TestAsyncGotify.test_delete_application ____________________
tests/test_async_gotify.py:146: in test_delete_application
    r = await agf.delete_application(self.data["app-id"])
                                     ^^^^^^^^^^^^^^^^^^^
E   KeyError: 'app-id'
_______________________ TestGotify.test_get_application ________________________
tests/test_gotify.py:64: in test_get_application
    check_type(r, List[Application])
/nix/store/x6bnxvn358dahzi1h1vz6g5312drskj1-python3.13-typeguard-4.4.4/lib/python3.13/site-packages/typeguard/_functions.py:107: in check_type
    check_type_internal(value, expected_type, memo)
/nix/store/x6bnxvn358dahzi1h1vz6g5312drskj1-python3.13-typeguard-4.4.4/lib/python3.13/site-packages/typeguard/_checkers.py:960: in check_type_internal
    checker(value, origin_type, args, memo)
/nix/store/x6bnxvn358dahzi1h1vz6g5312drskj1-python3.13-typeguard-4.4.4/lib/python3.13/site-packages/typeguard/_checkers.py:301: in check_list
    check_type_internal(v, args[0], memo)
/nix/store/x6bnxvn358dahzi1h1vz6g5312drskj1-python3.13-typeguard-4.4.4/lib/python3.13/site-packages/typeguard/_checkers.py:960: in check_type_internal
    checker(value, origin_type, args, memo)
/nix/store/x6bnxvn358dahzi1h1vz6g5312drskj1-python3.13-typeguard-4.4.4/lib/python3.13/site-packages/typeguard/_checkers.py:259: in check_typed_dict
    raise TypeCheckError(f"has unexpected extra key(s): {keys_formatted}")
E   typeguard.TypeCheckError: item 0 of list has unexpected extra key(s): "sortKey"
______________________ TestGotify.test_create_application ______________________
tests/test_gotify.py:68: in test_create_application
    check_type(deepcopy(r1), Application)
/nix/store/x6bnxvn358dahzi1h1vz6g5312drskj1-python3.13-typeguard-4.4.4/lib/python3.13/site-packages/typeguard/_functions.py:107: in check_type
    check_type_internal(value, expected_type, memo)
/nix/store/x6bnxvn358dahzi1h1vz6g5312drskj1-python3.13-typeguard-4.4.4/lib/python3.13/site-packages/typeguard/_checkers.py:960: in check_type_internal
    checker(value, origin_type, args, memo)
/nix/store/x6bnxvn358dahzi1h1vz6g5312drskj1-python3.13-typeguard-4.4.4/lib/python3.13/site-packages/typeguard/_checkers.py:259: in check_typed_dict
    raise TypeCheckError(f"has unexpected extra key(s): {keys_formatted}")
E   typeguard.TypeCheckError: dict has unexpected extra key(s): "sortKey"
______________________ TestGotify.test_update_application ______________________
tests/test_gotify.py:87: in test_update_application
    self.data["app-id"],
    ^^^^^^^^^^^^^^^^^^^
E   KeyError: 'app-id'
___________________ TestGotify.test_upload_application_image ___________________
tests/test_gotify.py:99: in test_upload_application_image
    r = gf.upload_application_image(self.data["app-id"], f)
                                    ^^^^^^^^^^^^^^^^^^^
E   KeyError: 'app-id'
_________________________ TestGotify.test_get_messages _________________________
tests/test_gotify.py:104: in test_get_messages
    r1 = gf.get_messages(self.data["app-id"])
                         ^^^^^^^^^^^^^^^^^^^
E   KeyError: 'app-id'
_______________________ TestGotify.test_delete_messages ________________________
tests/test_gotify.py:128: in test_delete_messages
    r1 = gf.delete_messages(self.data["app-id"])
                            ^^^^^^^^^^^^^^^^^^^
E   KeyError: 'app-id'
______________________ TestGotify.test_delete_application ______________________
tests/test_gotify.py:143: in test_delete_application
    r = gf.delete_application(self.data["app-id"])
                              ^^^^^^^^^^^^^^^^^^^
E   KeyError: 'app-id'
=============================== warnings summary ===============================
tests/test_async_gotify.py::TestAsyncGotify::test_stream
  /build/source/gotify/async_gotify.py:306: DeprecationWarning: websockets.client.connect is deprecated
    from websockets.client import connect as ws_connect

tests/test_async_gotify.py::TestAsyncGotify::test_stream
  /nix/store/ayghim14r5bxxs5gq5sja5hygj3m49fz-python3.13-websockets-15.0.1/lib/python3.13/site-packages/websockets/legacy/__init__.py:6: DeprecationWarning: websockets.legacy is deprecated; see https://websockets.readthedocs.io/en/stable/howto/upgrade.html for upgrade instructions
    warnings.warn(  # deprecated in 14.0 - 2024-11-09

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_async_gotify.py::TestAsyncGotify::test_get_application - typeguard.TypeCheckError: item 0 of list has unexpected extra key(s): "sort...
FAILED tests/test_async_gotify.py::TestAsyncGotify::test_create_application - typeguard.TypeCheckError: dict has unexpected extra key(s): "sortKey"
FAILED tests/test_async_gotify.py::TestAsyncGotify::test_update_application - KeyError: 'app-id'
FAILED tests/test_async_gotify.py::TestAsyncGotify::test_upload_application_image - KeyError: 'app-id'
FAILED tests/test_async_gotify.py::TestAsyncGotify::test_get_messages - KeyError: 'app-id'
FAILED tests/test_async_gotify.py::TestAsyncGotify::test_delete_messages - KeyError: 'app-id'
FAILED tests/test_async_gotify.py::TestAsyncGotify::test_delete_application - KeyError: 'app-id'
FAILED tests/test_gotify.py::TestGotify::test_get_application - typeguard.TypeCheckError: item 0 of list has unexpected extra key(s): "sort...
FAILED tests/test_gotify.py::TestGotify::test_create_application - typeguard.TypeCheckError: dict has unexpected extra key(s): "sortKey"
FAILED tests/test_gotify.py::TestGotify::test_update_application - KeyError: 'app-id'
FAILED tests/test_gotify.py::TestGotify::test_upload_application_image - KeyError: 'app-id'
FAILED tests/test_gotify.py::TestGotify::test_get_messages - KeyError: 'app-id'
FAILED tests/test_gotify.py::TestGotify::test_delete_messages - KeyError: 'app-id'
FAILED tests/test_gotify.py::TestGotify::test_delete_application - KeyError: 'app-id'
================== 14 failed, 41 passed, 2 warnings in 1.94s ===================

cc @Jo-Blade (Nixpkgs maintainer of python3Packages.gotify).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions