def _get_metadata(self):
     resource_metadata = resource_configuration.get_resource_metadata()
     metadata = {
         'version': '0.0.1',
         'plugins': {},
         'resources': resource_metadata
     }
     return metadata
Ejemplo n.º 2
0
def correct_metadata_is_returned():
    metadata = {
        'version': '0.0.1',
        'plugins': {},
        'resources': resource_configuration.get_resource_metadata()
    }
    expected = 'glimpse.data.initMetadata({0});'.format(json.dumps(metadata))

    url = resource_url('metadata?callback=glimpse.data.initMetadata')
    request = requests.get(url)

    assert_equal(expected, request.text)