Skip to content

Commit

Permalink
Merge pull request #712 from opengisch/better-comments-test_organization
Browse files Browse the repository at this point in the history
Same number in comment and test_organization
  • Loading branch information
faebebin authored Jul 4, 2023
2 parents d7941b3 + 87a12d4 commit 0d5d36e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docker-app/qfieldcloud/core/tests/test_organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,15 @@ def _active_users_count(base_date=None):
# Initially, there is no billable user
self.assertEqual(_active_users_count(), 0)

# User 1 creates a job
# user2 creates a job
Job.objects.create(
project=project1,
created_by=self.user2,
)
# There is now 1 billable user
self.assertEqual(_active_users_count(), 1)

# User 1 creates a delta
# user2 creates a delta
Delta.objects.create(
deltafile_id=uuid.uuid4(),
project=project1,
Expand All @@ -239,15 +239,15 @@ def _active_users_count(base_date=None):
# There is still 1 billable user
self.assertEqual(_active_users_count(), 1)

# User 2 creates a job
# user3 creates a job
Job.objects.create(
project=project1,
created_by=self.user3,
)
# There are 2 billable users
self.assertEqual(_active_users_count(), 2)

# User 2 leaves the organization
# user3 leaves the organization
OrganizationMember.objects.filter(member=self.user3).delete()

# There are still 2 billable users
Expand All @@ -256,10 +256,10 @@ def _active_users_count(base_date=None):
# Report at a different time is empty
self.assertEqual(_active_users_count(now() + timedelta(days=365)), 0)

# User 3 creates a job
# user4 creates a job
Job.objects.create(
project=project1,
created_by=self.user4,
)
# There are still 2 billable users, because self.user4 is staff
# There are still 2 billable users, because user4 is staff
self.assertEqual(_active_users_count(), 2)

0 comments on commit 0d5d36e

Please sign in to comment.