def test_collector_scheme(self): field = fields.FieldImage('image') field.set_value('collector://collections/demo/demo.png') self.assertEqual( join(Config.get_instance().get_data_path(), 'collections', 'demo', 'demo.png'), field.get_value() )
# -*- coding: utf-8 -*- from collector.core.config import Config config = Config.get_instance() BASE_PATH = 'collector://collections/demo' boardgames = [ { 'id': 1, 'title': 'The Pillars of the Earth', 'year': 2007, 'designer': [1, 2], 'artist': [3, 4, 5], 'image': BASE_PATH + '/pilares.jpg' }, { 'id': 2, 'title': 'Coney Island', 'year': 2010, 'designer': [6], 'artist': [7], 'image': BASE_PATH + '/coney-island.jpg' } ] people = [ {'id': 1, 'name': 'Michael Rieneck'}, {'id': 2, 'name': 'Stefan Stadler'}, {'id': 3, 'name': 'Michael Menzel'}, {'id': 4, 'name': 'Anke Pohl'},