def test_get_metadata_keys(self):
     """Get the metadata keys associated with this crowdsoucre's data"""
     crowdsource = CrowdsourceFactory()
     eq_(crowdsource.get_metadata_keys(), [])
     data = CrowdsourceDataFactory(crowdsource=crowdsource)
     eq_(crowdsource.get_metadata_keys(), [])
     data.metadata = {'foo': 'bar', 'muck': 'rock'}
     data.save()
     eq_(set(crowdsource.get_metadata_keys()), {'foo', 'muck'})
Esempio n. 2
0
 def test_get_metadata_keys(self):
     """Get the metadata keys associated with this crowdsoucre's data"""
     crowdsource = CrowdsourceFactory()
     eq_(crowdsource.get_metadata_keys(), [])
     data = CrowdsourceDataFactory(crowdsource=crowdsource)
     eq_(crowdsource.get_metadata_keys(), [])
     data.metadata = {"foo": "bar", "muck": "rock"}
     data.save()
     eq_(set(crowdsource.get_metadata_keys()), {"foo", "muck"})