コード例 #1
0
ファイル: test_auth.py プロジェクト: Dolphman/pynationstates
 def test_headers_user_usepasswordoral_autologin(self):
     auth = Auth(1, autologin=2, pin=3)
     auth.__usepasswordoral__ = True
     self.assertEqual(auth.headers(), {"Autologin": 2})
コード例 #2
0
ファイル: test_auth.py プロジェクト: Dolphman/pynationstates
 def test_headers_user_usepasswordoral_password(self):
     auth = Auth(1, password=1, pin=3)
     auth.__usepasswordoral__ = True
     self.assertEqual(auth.headers(), {"Password": 1})
コード例 #3
0
ファイル: test_auth.py プロジェクト: Dolphman/pynationstates
 def test_headers_use_autologin_then_pin(self):
     auth = Auth(1,autologin=2)
     self.assertEqual(auth.headers(), {"Autologin": 2})
     auth.__pin__ = 3
     self.assertEqual(auth.headers(), {"Pin": 3})
コード例 #4
0
ファイル: test_auth.py プロジェクト: Dolphman/pynationstates
 def test_headers_use_autologin_over_password(self):
     auth = Auth(1,password=1,autologin=2)
     self.assertEqual(auth.headers(), {"Autologin": 2})
コード例 #5
0
ファイル: test_auth.py プロジェクト: Dolphman/pynationstates
 def test_headers_use_password_then_pin(self):
     auth = Auth(1,password=1)
     self.assertEqual(auth.headers(), {"Password": 1})
     auth.__pin__ = 3
     self.assertEqual(auth.headers(), {"Pin": 3})
コード例 #6
0
ファイル: test_auth.py プロジェクト: Dolphman/pynationstates
 def test_headers_use_password(self):
     auth = Auth(1,password=1)
     self.assertEqual(auth.headers(), {"Password": 1})