def test_get_or_make_download(self):
     """Test get_or_make_download."""
     dl = downloadservices.get_or_make_download(
         self.user.id, self.volume_id, self.fpath, self.dl_url, self.dl_key)
     self.assertEqual(dl.owner_id, self.user.id)
     self.assertEqual(dl.volume_id, self.volume_id)
     self.assertEqual(dl.file_path, self.fpath)
     self.assertEqual(dl.download_url, self.dl_url)
     self.assertEqual(dl.download_key, unicode(repr(self.dl_key)))
     # do it again, make sure we get the same one
     dl2 = downloadservices.get_or_make_download(
         self.user.id, self.volume_id, self.fpath, self.dl_url, self.dl_key)
     self.assertEqual(dl.id, dl2.id)
Exemple #2
0
 def test_get_or_make_download(self):
     """Test get_or_make_download."""
     dl = downloadservices.get_or_make_download(self.user.id,
                                                self.volume_id, self.fpath,
                                                self.dl_url, self.dl_key)
     self.assertEqual(dl.owner_id, self.user.id)
     self.assertEqual(dl.volume_id, self.volume_id)
     self.assertEqual(dl.file_path, self.fpath)
     self.assertEqual(dl.download_url, self.dl_url)
     self.assertEqual(dl.download_key, unicode(repr(self.dl_key)))
     # do it again, make sure we get the same one
     dl2 = downloadservices.get_or_make_download(self.user.id,
                                                 self.volume_id, self.fpath,
                                                 self.dl_url, self.dl_key)
     self.assertEqual(dl.id, dl2.id)
Exemple #3
0
 def get_or_make_it(self):
     """Make the download."""
     return downloadservices.get_or_make_download(self.user.id,
                                                  self.volume_id,
                                                  self.fpath, self.dl_url,
                                                  self.dl_key)
 def get_or_make_it(self):
     """Make the download."""
     return downloadservices.get_or_make_download(
         self.user.id, self.volume_id, self.fpath, self.dl_url, self.dl_key)