Exemplo n.º 1
0
 def test_missing_token(self):
     with self.assertRaises(rfapi.error.MissingAuthError):
         client = RawApiClient(auth=None)
         client.get_status()
Exemplo n.º 2
0
 def test_invalid_token(self):
     with self._assertRaisesRegex(rfapi.error.AuthenticationError,
                                  "Authentication failed"):
         client = RawApiClient(auth='nosuchtoken')
         client.get_status()
Exemplo n.º 3
0
 def test_status_query(self):
     api = RawApiClient()
     status = api.get_status(False)
     self.assertIsInstance(status, dict)