コード例 #1
0
ファイル: test_cosmosdbsql.py プロジェクト: yangaowei/celery
    def test_default_connection_url(self):
        endpoint, password = CosmosDBSQLBackend._parse_url(
            "cosmosdbsql://:key@host")

        assert password == "key"
        assert endpoint == "https://*****:*****@host:443")

        assert password == "key"
        assert endpoint == "https://*****:*****@host:8080")

        assert password == "key"
        assert endpoint == "http://host:8080"
コード例 #2
0
ファイル: test_cosmosdbsql.py プロジェクト: auvipy/celery
    def test_default_connection_url(self):
        endpoint, password = CosmosDBSQLBackend._parse_url(
            "cosmosdbsql://:key@host")

        assert password == "key"
        assert endpoint == "https://*****:*****@host:443")

        assert password == "key"
        assert endpoint == "https://*****:*****@host:8080")

        assert password == "key"
        assert endpoint == "http://host:8080"
コード例 #3
0
ファイル: test_cosmosdbsql.py プロジェクト: yyz940922/celery
    def test_bad_connection_url(self):
        with pytest.raises(ImproperlyConfigured):
            CosmosDBSQLBackend._parse_url("cosmosdbsql://:key@")

        with pytest.raises(ImproperlyConfigured):
            CosmosDBSQLBackend._parse_url("cosmosdbsql://:@host")

        with pytest.raises(ImproperlyConfigured):
            CosmosDBSQLBackend._parse_url("cosmosdbsql://corrupted")
コード例 #4
0
ファイル: test_cosmosdbsql.py プロジェクト: auvipy/celery
    def test_bad_connection_url(self):
        with pytest.raises(ImproperlyConfigured):
            CosmosDBSQLBackend._parse_url(
                "cosmosdbsql://:key@")

        with pytest.raises(ImproperlyConfigured):
            CosmosDBSQLBackend._parse_url(
                "cosmosdbsql://:@host")

        with pytest.raises(ImproperlyConfigured):
            CosmosDBSQLBackend._parse_url(
                "cosmosdbsql://corrupted")