From 0503ee15734a9662a232d47696fde3c87ff7e2ef Mon Sep 17 00:00:00 2001 From: Martin Kudlej Date: Mon, 27 May 2024 10:17:35 +0200 Subject: [PATCH] add test for user key with random value --- tests/integration/test_integration_application.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/integration/test_integration_application.py b/tests/integration/test_integration_application.py index 24102c3..051bc99 100644 --- a/tests/integration/test_integration_application.py +++ b/tests/integration/test_integration_application.py @@ -1,5 +1,7 @@ -import pytest +import random +import string import secrets +import pytest from tests.integration import asserts @@ -35,3 +37,9 @@ def test_application_key_can_be_created(app_key, app_key_params): def test_application_key_list(application, app_key): keys = application.keys.list() assert len(keys) > 0 + +def test_application_update_userkey(application): + new_key = "".join(random.choices(string.ascii_letters + string.digits + "-_.", k=100)) + updated_application = application.update(params={"user_key": new_key}) + asserts.assert_resource(updated_application) + assert updated_application["user_key"] == new_key