Ejemplo n.º 1
0
    def test_srs_no_config_with_mode(self):
        config = srs_config_from_file(os.path.join(TEST_ROOT, "config_blank.ini"), mode="prod")
        auth = auth_from_config(config)
        self.assertEqual(config["url"], _default_url(mode="prod"))
        self.assertEqual(auth, None)

        client = srs_client_from_config_file(path=os.path.join(TEST_ROOT, "config_blank.ini"))
        self.assertEqual(client.http_client.auth_strategy, None)
Ejemplo n.º 2
0
    def test_srs_no_config(self):
        config = srs_config_from_file(
            path=os.path.join(TEST_ROOT, "config_blank.ini"))
        auth = auth_from_config(config)
        self.assertEqual(config["url"], _default_url())
        self.assertEqual(auth, None)

        client = srs_client_from_config_file(
            path=os.path.join(TEST_ROOT, "config_blank.ini"))
        self.assertEqual(client.http_client.auth_strategy, None)
Ejemplo n.º 3
0
 def test_srs_config_file_none(self):
     config = srs_config_from_file(os.path.join(TEST_ROOT, "config_srs.ini"), "dev")
     print(config)
     auth = auth_from_config(config)
     self.assertEqual(auth, None)
Ejemplo n.º 4
0
 def test_srs_config_file(self):
     config = srs_config_from_file(os.path.join(TEST_ROOT, "config_srs.ini"))
     auth = auth_from_config(config)
     self.assertEqual(type(auth), HMACAuthSRS)
Ejemplo n.º 5
0
 def test_srs_config_file_none(self):
     config = srs_config_from_file(
         os.path.join(TEST_ROOT, "config_srs.ini"), "dev")
     print(config)
     auth = auth_from_config(config)
     self.assertEqual(auth, None)
Ejemplo n.º 6
0
 def test_srs_config_file(self):
     config = srs_config_from_file(os.path.join(TEST_ROOT,
                                                "config_srs.ini"))
     auth = auth_from_config(config)
     self.assertEqual(type(auth), HMACAuthSRS)