From e6291187ba1beef9e7785a9097c9957cba368e3d Mon Sep 17 00:00:00 2001 From: Pea Tyczynska Date: Tue, 11 May 2021 12:19:33 +0100 Subject: [PATCH] Remove registration_response from webauthn serialize - not needed in admin app Also fix tests: First add init file so the tests are found correctly, then update the tests after we stopped serialising webauthn registration_response. --- app/models.py | 1 - tests/app/webauthn/__init__.py | 0 tests/app/webauthn/test_rest.py | 1 - 3 files changed, 2 deletions(-) create mode 100644 tests/app/webauthn/__init__.py diff --git a/app/models.py b/app/models.py index 23928451c..1c36c3a01 100644 --- a/app/models.py +++ b/app/models.py @@ -2622,7 +2622,6 @@ class WebauthnCredential(db.Model): 'user_id': str(self.user_id), 'name': self.name, 'credential_data': self.credential_data, - 'registration_response': self.registration_response, 'created_at': self.created_at.strftime(DATETIME_FORMAT), 'updated_at': get_dt_string_or_none(self.updated_at), } diff --git a/tests/app/webauthn/__init__.py b/tests/app/webauthn/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/app/webauthn/test_rest.py b/tests/app/webauthn/test_rest.py index 8256ffb2d..0838e52e2 100644 --- a/tests/app/webauthn/test_rest.py +++ b/tests/app/webauthn/test_rest.py @@ -24,7 +24,6 @@ def test_get_webauthn_credentials_returns_all_credentials_for_user(admin_request 'user_id': str(me.id), 'name': '1', 'credential_data': 'ABC123', - 'registration_response': 'DEF456', 'created_at': ANY, 'updated_at': None }