Esempio n. 1
0
    def test_most_accessed(self):
        client = DatasetClient()

        res = client.most_accessed(20)
        assert res.status_code == 200
        assert res.json()["count"] == 20

        try:
            res = client.most_accessed(0)
        except BadRequest as err:
            assert err.status == 500
Esempio n. 2
0
    def test_most_accessed(self):
        client = DatasetClient()

        res = client.most_accessed(20)

        assert res.count > 0
        assert len(res.datasets) > 0

        try:
            res = client.most_accessed(0)
        except BadRequest as err:
            assert err.status == 500