def test_discovery(endpoint, json_filename):
    generator = discovery_generator.DiscoveryGenerator()
    # JSON roundtrip so we get consistent string types
    actual = json.loads(generator.pretty_print_config_to_json(
        [endpoint], hostname='discovery-test.appspot.com'))
    expected = load_expected_document(json_filename)
    assert actual == expected
 def setUp(self):
     self.generator = discovery_generator.DiscoveryGenerator()