Esempio n. 1
0
 def test_get_application_id_throws_error(self) -> None:
     with self.swap(os, 'getenv', lambda _: None):
         with self.assertRaisesRegexp(  # type: ignore[no-untyped-call]
                 ValueError, 'Value None for application id is invalid.'):
             gae_app_identity_services.get_application_id()
 def test_get_application_id(self):
     self.assertEqual(gae_app_identity_services.get_application_id(),
                      self.expected_application_id)
Esempio n. 3
0
 def test_get_application_id(self) -> None:
     with self.swap(os, 'getenv', lambda _: 'some_id'):
         self.assertEqual(gae_app_identity_services.get_application_id(),
                          'some_id')