Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit a42d836

Browse files
committed
more test cases
1 parent 945afcc commit a42d836

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

tests/test_radar_returning_csv.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
""" radar returning CSV test """
2+
3+
import os
4+
import sys
5+
import uuid
6+
7+
sys.path.insert(0, os.path.abspath('..'))
8+
import CloudFlare
9+
10+
# test radar - this tests CSV responses
11+
12+
cf = None
13+
14+
def test_cloudflare():
15+
global cf
16+
cf = CloudFlare.CloudFlare()
17+
assert isinstance(cf, CloudFlare.CloudFlare)
18+
19+
def test_radar_datasets_ranking_top_200():
20+
results = cf.radar.datasets('ranking_top_200')
21+
assert len(results) > 0
22+
lines = results.splitlines()
23+
assert lines[0] == 'domain'
24+
assert len(lines) >= 200+1
25+
26+
def test_radar_datasets_ranking_top_1000():
27+
results = cf.radar.datasets('ranking_top_1000')
28+
assert len(results) > 0
29+
lines = results.splitlines()
30+
assert lines[0] == 'domain'
31+
assert len(lines) >= 1000+1
32+

0 commit comments

Comments
 (0)