From 591930857596623d8dd89254d2c51bb7ba6a928f Mon Sep 17 00:00:00 2001 From: Mary Salvi Date: Tue, 5 Mar 2024 11:28:26 -0500 Subject: [PATCH] Update tests --- dandiapi/api/tests/test_dandiset.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dandiapi/api/tests/test_dandiset.py b/dandiapi/api/tests/test_dandiset.py index 4ac6d78e1..e71c7ebf5 100644 --- a/dandiapi/api/tests/test_dandiset.py +++ b/dandiapi/api/tests/test_dandiset.py @@ -825,6 +825,7 @@ def test_dandiset_rest_get_owners(api_client, dandiset, social_account): { 'username': social_account.extra_data['login'], 'name': social_account.extra_data['name'], + 'email': None, } ] @@ -836,7 +837,13 @@ def test_dandiset_rest_get_owners_no_social_account(api_client, dandiset, user): resp = api_client.get(f'/api/dandisets/{dandiset.identifier}/users/') assert resp.status_code == 200 - assert resp.data == [{'username': user.username, 'name': f'{user.first_name} {user.last_name}'}] + assert resp.data == [ + { + 'username': user.username, + 'name': f'{user.first_name} {user.last_name}', + 'email': None, + } + ] @pytest.mark.parametrize( @@ -871,6 +878,7 @@ def test_dandiset_rest_change_owner( { 'username': social_account2.extra_data['login'], 'name': social_account2.extra_data['name'], + 'email': social_account2.extra_data['email'], } ] assert list(dandiset.owners) == [user2] @@ -943,10 +951,12 @@ def test_dandiset_rest_add_owner( { 'username': social_account1.extra_data['login'], 'name': social_account1.extra_data['name'], + 'email': social_account1.extra_data['email'], }, { 'username': social_account2.extra_data['login'], 'name': social_account2.extra_data['name'], + 'email': social_account2.extra_data['email'], }, ] assert list(dandiset.owners) == [user1, user2] @@ -983,6 +993,7 @@ def test_dandiset_rest_remove_owner( { 'username': social_account1.extra_data['login'], 'name': social_account1.extra_data['name'], + 'email': social_account1.extra_data['email'], } ] assert list(dandiset.owners) == [user1]