Exemplo n.º 1
0
 def _assert_model_added_to_collection(self, attr):
     save_file(u'jackfile', u'bauercontent')
     assert len(getattr(self, attr)) == 1
     obj = getattr(self, attr)[0]
     assert obj.name == u'jackfile'
     assert obj.url == self.storage.url(u'jackfile')
 def _assert_model_added_to_collection(self, attr):
     save_file(u'jackfile', u'bauercontent')
     assert len(getattr(self, attr)) == 1
     obj = getattr(self, attr)[0]
     assert obj.name == u'jackfile'
     assert obj.url == self.storage.url(u'jackfile')
Exemplo n.º 3
0
 def test_saves_data_to_storage(self):
     save_file(u'jackfile', u'bauercontent')
     assert self.storage.exists(u'jackfile')
     assert self.storage.open(u'jackfile').read() == u'bauercontent'
 def test_saves_data_to_storage(self):
     save_file(u'jackfile', u'bauercontent')
     assert self.storage.exists(u'jackfile')
     assert self.storage.open(u'jackfile').read() == u'bauercontent'