Exemplo n.º 1
0
def valid_resource_with_description(valid_dataset):
    resource = Resource()
    resource.url = "http://smth.smwhere.com"
    resource.title = "Resource name"
    resource.description = "Test Resource Description"
    resource.dataset = valid_dataset
    resource.status = 'published'
    resource.save()
    return resource
Exemplo n.º 2
0
def valid_resource_with_description(valid_dataset):
    resource = Resource()
    resource.link = "http://falconframework.org"
    resource.title = "Resource name"
    resource.description = "Test Resource Description"
    resource.dataset = valid_dataset
    resource.status = 'published'
    resource.tracker.saved_data['link'] = resource.link
    resource.tracker.saved_data['file'] = resource.file
    resource.save()
    return resource
Exemplo n.º 3
0
 def test_resource_create(self, valid_dataset):
     r = Resource()
     # r.name = "test"
     r.title = "test"
     r.description = "Opis zasobu"
     r.format = "csv"
     r.resource_type = "zestawienie"
     r.old_resource_type = "zestawienie"
     r.dataset = valid_dataset
     r.link = "http://test.to.resource.pl/1.xls"
     r.data_date = "2018-10-02"
     assert r.full_clean() is None
     assert r.id is None
     r.save()
     assert r.id is not None