Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gannetson committed Aug 19, 2022
1 parent fc7b442 commit 4811f1d
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions bluebottle/members/tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,23 +236,21 @@ def setUp(self):

def test_readonly_fields(self):
fields = self.member_admin.get_readonly_fields(self.request, self.member)
expected_fields = set((
'date_joined', 'last_login', 'updated', 'deleted', 'login_as_link',
'reset_password', 'resend_welcome_link',
'initiatives', 'period_activities', 'date_activities', 'funding', 'deeds', 'collect',
'is_superuser', 'kyc'
))
expected_fields = {
'date_joined', 'last_login', 'updated', 'deleted', 'login_as_link', 'reset_password',
'resend_welcome_link', 'initiatives', 'period_activities', 'date_activities', 'funding',
'deeds', 'collect', 'is_superuser', 'kyc', 'hours_planned', 'hours_spent'
}

self.assertEqual(expected_fields, set(fields))

def test_readonly_fields_create(self):
fields = self.member_admin.get_readonly_fields(self.request)
expected_fields = set((
'date_joined', 'last_login', 'updated', 'deleted', 'login_as_link',
'reset_password', 'resend_welcome_link',
'initiatives', 'date_activities', 'period_activities', 'funding', 'deeds', 'collect',
'is_superuser', 'kyc'
))
expected_fields = {
'date_joined', 'last_login', 'updated', 'deleted', 'login_as_link', 'reset_password',
'resend_welcome_link', 'initiatives', 'date_activities', 'period_activities', 'funding',
'deeds', 'collect', 'is_superuser', 'kyc', 'hours_planned', 'hours_spent'
}

self.assertEqual(expected_fields, set(fields))
self.member_admin = MemberAdmin(Member, AdminSite())
Expand Down Expand Up @@ -295,7 +293,6 @@ def test_super_user(self):


class MemberPlatformSettingsAdminTestCase(BluebottleAdminTestCase):

extra_environ = {}
csrf_checks = False
setup_auth = True
Expand Down Expand Up @@ -579,7 +576,6 @@ def test_engagement_shows_collect(self):


class MemberNotificationsAdminTestCase(BluebottleAdminTestCase):

extra_environ = {}
csrf_checks = False
setup_auth = True
Expand Down

0 comments on commit 4811f1d

Please sign in to comment.