'Test the invalid cases: substitutions is not exactly right.'

def test_endpoint_create_with_invalid_url(self):

    invalid_urls = ['http://127.0.0.1:8774/v1.1/$(nonexistent)s', 'http://127.0.0.1:8774/v1.1/$(project_id)', 'http://127.0.0.1:8774/v1.1/$(project_id)t', 'http://127.0.0.1:8774/v1.1/$(project_id', 'http://127.0.0.1:8774/v1.1/$(admin_url)d']
    valid_url = 'http://127.0.0.1:8774/v1.1/$(project_id)s'
    for invalid_url in invalid_urls:
        self._endpoint_create(expected_status=http_client.BAD_REQUEST, publicurl=invalid_url, internalurl=invalid_url, adminurl=invalid_url)
    for invalid_url in invalid_urls:
        self._endpoint_create(expected_status=http_client.BAD_REQUEST, publicurl=invalid_url, internalurl=invalid_url, adminurl=valid_url)
    for invalid_url in invalid_urls:
        self._endpoint_create(expected_status=http_client.BAD_REQUEST, publicurl=invalid_url, internalurl=valid_url, adminurl=invalid_url)
    for invalid_url in invalid_urls:
        self._endpoint_create(expected_status=http_client.BAD_REQUEST, publicurl=valid_url, internalurl=invalid_url, adminurl=invalid_url)
    for invalid_url in invalid_urls:
        self._endpoint_create(expected_status=http_client.BAD_REQUEST, publicurl=invalid_url, internalurl=valid_url, adminurl=valid_url)
    for invalid_url in invalid_urls:
        self._endpoint_create(expected_status=http_client.BAD_REQUEST, publicurl=valid_url, internalurl=invalid_url, adminurl=valid_url)
    for invalid_url in invalid_urls:
        self._endpoint_create(expected_status=http_client.BAD_REQUEST, publicurl=valid_url, internalurl=valid_url, adminurl=invalid_url)
