This repository was archived by the owner on Nov 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+
You can’t perform that action at this time.
0 commit comments