def test_create_session(self): SyncGateway.put_user("username1", "*****@*****.**", "password", ["public"]) res = SyncGateway.create_session("username1") self.assertEqual(res.status_code, 200) res = SyncGateway.create_session("username1", ttl=60 * 60 * 24) self.assertEqual(res.status_code, 200)
def test_create_session_for_non_existing_user(self): with self.assertRaises(SyncGatewayException): SyncGateway.create_session("not_existing_user")