Skip to content

Commit

Permalink
Add coverage for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry Kodden committed Oct 9, 2024
1 parent 87e27ef commit 84e07d7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/test/scim/test_sweep.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json

import responses

from datetime import timedelta
from werkzeug.exceptions import BadRequest

from server.api.base import application_base_url
Expand Down Expand Up @@ -218,6 +219,10 @@ def test_user_changed(self):
setattr(user, attr, "changed")
self.assertTrue(_user_changed(user, remote_user))
setattr(user, attr, stored_attr)

user.last_login_date -= timedelta(hours=24)
self.assertTrue(_user_changed(user, remote_user))
user.last_login_date += timedelta(hours=24)
user.suspended = True
self.assertTrue(_user_changed(user, remote_user))
user.suspended = False
Expand Down

0 comments on commit 84e07d7

Please sign in to comment.