Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
noliveleger committed Nov 29, 2024
1 parent 58906c3 commit 33966ab
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Generated by Django 4.2.15 on 2024-11-28 19:58

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):
Expand Down
5 changes: 2 additions & 3 deletions kobo/apps/organizations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ def get_user_role(self, user: 'User') -> OrganizationRole:

return ORG_MEMBER_ROLE


@cache_for_request
def is_admin(self, user: 'User') -> bool:
"""
Expand Down Expand Up @@ -261,8 +260,8 @@ def active_subscription_statuses(self):
@property
def active_subscription_status(self):
"""
Return a comma-separated string of active subscriptions for the organization
user.
Return a comma-separated string of active subscriptions for the
organization user.
"""
return ', '.join(self.active_subscription_statuses)

Expand Down
4 changes: 3 additions & 1 deletion kobo/apps/organizations/tests/test_organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ def test_org_attributes_synced_without_mmo(self):

anotheruser_extra_details = self.anotheruser.extra_details
anotheruser_extra_details.data['organization'] = 'AnotherUser Enterprises'
anotheruser_extra_details.data['organization_website'] = 'https://anotheruser.org/'
anotheruser_extra_details.data['organization_website'] = (
'https://anotheruser.org/'
)
anotheruser_extra_details.data['organization_type'] = 'commercial'
anotheruser_extra_details.save()
organization.refresh_from_db()
Expand Down
1 change: 0 additions & 1 deletion kobo/apps/organizations/tests/test_organizations_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def test_list(self):
def test_api_returns_org_data(self):
self._insert_data()
response = self.client.get(self.url_detail)
self.assertContains(response, self.organization.slug)
self.assertContains(response, self.organization.id)
self.assertContains(response, self.organization.name)

Expand Down

0 comments on commit 33966ab

Please sign in to comment.