コード例 #1
0
ファイル: tests.py プロジェクト: yusty27/django_cbtools
 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
ファイル: tests.py プロジェクト: smarttradeapp/django_cbtools
 def test_create_session_for_non_existing_user(self):
     with self.assertRaises(SyncGatewayException):
         SyncGateway.create_session("not_existing_user")
コード例 #3
0
ファイル: tests.py プロジェクト: smarttradeapp/django_cbtools
 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")