1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-18 16:36:15 +00:00

support collaborate notis interval (#4841)

* support collaborate notis interval

* fix unit-test

* fix unit-test

* fix unit-test

* fix unit-test

* fix unit-test

* update text

* fix error msg
This commit is contained in:
Alex Happy
2021-03-25 21:44:58 +08:00
committed by GitHub
parent 855b457e5f
commit eca5a3b933
8 changed files with 186 additions and 74 deletions

View File

@@ -26,22 +26,23 @@ class AccountInfoTest(BaseTestCase):
def test_update(self, ):
self.login_as(self.user)
resp = self._do_put('name=foo&email_notification_interval=3000')
resp = self._do_put('name=foo&file_updates_email_interval=3000&collaborate_email_interval=3000')
self.assertEqual(200, resp.status_code)
json_resp = json.loads(resp.content)
assert json_resp['email_notification_interval'] == 3000
assert json_resp['file_updates_email_interval'] == 3000
assert json_resp['collaborate_email_interval'] == 3000
assert json_resp['name'] == 'foo'
def test_update_email_nofification_interval(self, ):
self.login_as(self.user)
resp = self._do_put('email_notification_interval=3000')
resp = self._do_put('file_updates_email_interval=3000')
self.assertEqual(200, resp.status_code)
json_resp = json.loads(resp.content)
assert json_resp['email_notification_interval'] == 3000
assert json_resp['file_updates_email_interval'] == 3000
resp = self._do_put('email_notification_interval=0')
resp = self._do_put('file_updates_email_interval=0')
self.assertEqual(200, resp.status_code)
json_resp = json.loads(resp.content)
assert json_resp['email_notification_interval'] == 0
assert json_resp['file_updates_email_interval'] == 0