Exemple #1
0
    def test_post_download(self):
        req = GbifDownload("name", "email")
        req.add_iterative_predicate('BASIS_OF_RECORD',
                                    ['FOSSIL_SPECIMEN', 'LITERATURE'])
        dl_key = req.post_download("name", "pwd")
        if not dl_key:
            raise KeyError("You might have too many downloads running at the \
                            same time. Check your downloads page!")

        while req.get_status() in ['PREPARING', 'RUNNING']:
            print('Preparing ...')
            time.sleep(10)
        self.assertIn(req.get_status(), ['SUCCEEDED', 'KILLED'])
    def test_post_download(self):
        req = GbifDownload("name", "email")
        req.add_iterative_predicate('BASIS_OF_RECORD',
                                    ['FOSSIL_SPECIMEN', 'LITERATURE'])
        dl_key = req.post_download("name", "pwd")
        if not dl_key:
            raise KeyError("You might have too many downloads running at the \
                            same time. Check your downloads page!")

        while req.get_status() in ['PREPARING', 'RUNNING']:
            print('Preparing ...')
            time.sleep(10)
        self.assertIn(req.get_status(), ['SUCCEEDED', 'KILLED'])
Exemple #3
0
    def test_post_download(self):
        req = GbifDownload("name", "email")
        req.add_iterative_predicate("BASIS_OF_RECORD",
                                    ["FOSSIL_SPECIMEN", "LITERATURE"])
        dl_key = req.post_download("name", "pwd")
        if not dl_key:
            raise KeyError("You might have too many downloads running at the \
                            same time. Check your downloads page!")

        while req.get_status() in ["PREPARING", "RUNNING"]:
            print("Preparing ...")
            time.sleep(10)
        self.assertIn(req.get_status(), ["SUCCEEDED", "KILLED"])