def test_gae_standard(self, _running_on_gce): os.environ['SERVER_SOFTWARE'] = 'Google App Engine/1.2.3' self.assertEqual(report_request.ReportedPlatforms.GAE_STANDARD, wsgi._get_platform())
def test_unknown(self, _running_on_gce): self.assertEqual(report_request.ReportedPlatforms.UNKNOWN, wsgi._get_platform())
def test_gae_flex(self, _running_on_gce): os.environ['GAE_MODULE_NAME'] = 'gae_module' self.assertEqual(report_request.ReportedPlatforms.GAE_FLEX, wsgi._get_platform())
def test_gce(self, _running_on_gce): self.assertEqual(report_request.ReportedPlatforms.GCE, wsgi._get_platform())
def test_development(self): os.environ['SERVER_SOFTWARE'] = 'Development/2.0.0' self.assertEqual(report_request.ReportedPlatforms.DEVELOPMENT, wsgi._get_platform())
def test_gke(self): os.environ['KUBERNETES_SERVICE_HOST'] = 'hostname' self.assertEqual(report_request.ReportedPlatforms.GKE, wsgi._get_platform())
def test_gae_standard(self, _running_on_gce): os.environ['GAE_MODULE_NAME'] = 'gae_module' self.assertEqual(report_request.ReportedPlatforms.GAE_STANDARD, wsgi._get_platform())