Ejemplo n.º 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'])
Ejemplo n.º 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"])