Add test for delete profile db method (#1654)

This commit is contained in:
Jonathan Zernik 2021-10-19 08:07:06 -05:00 committed by GitHub
parent aac56d4aa5
commit 93057f90b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -173,6 +173,14 @@ def profile_with_new_name(squeak_db, profile_with_new_name_id):
)
@pytest.fixture
def deleted_profile_id(squeak_db, inserted_contact_profile_id):
squeak_db.delete_profile(
inserted_contact_profile_id,
)
yield inserted_contact_profile_id
@pytest.fixture
def inserted_squeak_hashes(squeak_db, signing_key):
ret = []
@ -443,6 +451,12 @@ def test_set_profile_name(squeak_db, profile_with_new_name, new_profile_name):
assert profile_with_new_name.profile_name == new_profile_name
def test_deleted_profile(squeak_db, deleted_profile_id):
profile = squeak_db.get_profile(deleted_profile_id)
assert profile is None
def test_get_liked_squeak_entries(
squeak_db,
liked_squeak_hashes,