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"
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"
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")
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")