'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']
    ref = unit.new_endpoint_ref(self.service_id)
    for invalid_url in invalid_urls:
        ref['url'] = invalid_url
        self.post('/endpoints', body={'endpoint': ref}, expected_status=http_client.BAD_REQUEST)
