def test_batch(self): client = DatasetClient() res = client.batch("PXD000210", 'pride') assert res.status_code == 200 assert res.json()["datasets"][0]["id"] == "PXD000210" try: client.batch("gulugulu11", "momomomomo") except BadRequest as err: assert err.status == DATA_NOT_FOUND try: client.batch(None, "momomomomo") except BadRequest as err: assert err.status == MISSING_PARAMETER
def test_batch(self): client = DatasetClient() res = client.batch("PXD000210", 'pride') assert len(res.failure) == 0 assert res.datasets[0].accession == "PXD000210" try: client.batch("gulugulu11", "momomomomo") except BadRequest as err: assert err.status == DATA_NOT_FOUND try: client.batch(None, "momomomomo") except BadRequest as err: assert err.status == MISSING_PARAMETER