예제 #1
0
 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)
예제 #2
0
 def test_create_session_for_non_existing_user(self):
     with self.assertRaises(SyncGatewayException):
         SyncGateway.create_session("not_existing_user")
예제 #3
0
 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)
예제 #4
0
 def test_create_session_for_non_existing_user(self):
     with self.assertRaises(SyncGatewayException):
         SyncGateway.create_session("not_existing_user")