forked from cloudflare-api/python-cloudflare-v4
-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
""" radar returning CSV test """ | ||
|
||
import os | ||
import sys | ||
import uuid | ||
|
||
sys.path.insert(0, os.path.abspath('..')) | ||
import CloudFlare | ||
|
||
# test radar - this tests CSV responses | ||
|
||
cf = None | ||
|
||
def test_cloudflare(): | ||
global cf | ||
cf = CloudFlare.CloudFlare() | ||
assert isinstance(cf, CloudFlare.CloudFlare) | ||
|
||
def test_radar_datasets_ranking_top_200(): | ||
results = cf.radar.datasets('ranking_top_200') | ||
assert len(results) > 0 | ||
lines = results.splitlines() | ||
assert lines[0] == 'domain' | ||
assert len(lines) >= 200+1 | ||
|
||
def test_radar_datasets_ranking_top_1000(): | ||
results = cf.radar.datasets('ranking_top_1000') | ||
assert len(results) > 0 | ||
lines = results.splitlines() | ||
assert lines[0] == 'domain' | ||
assert len(lines) >= 1000+1 | ||
|