-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from davidteather/nightly
V2.1.6
- Loading branch information
Showing
7 changed files
with
103 additions
and
16 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
Binary file not shown.
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
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
Binary file modified
BIN
+541 Bytes
(120%)
tests/__pycache__/test_trending.cpython-37-pytest-5.1.2.pyc
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
@@ -1,18 +1,13 @@ | ||
from TikTokApi import TikTokapi | ||
|
||
def getTrending(results): | ||
api = TikTokapi("browsermob-proxy/bin/browsermob-proxy", headless=True) | ||
trending = api.trending(results) | ||
|
||
return len(trending) | ||
|
||
|
||
def test_trending(): | ||
assert getTrending(5) == 5 | ||
assert getTrending(10) == 10 | ||
assert getTrending(20) == 20 | ||
api = TikTokapi("browsermob-proxy/bin/browsermob-proxy", headless=True) | ||
assert len(api.trending(5)) >= 5 | ||
assert len(api.trending(10)) >= 10 | ||
assert len(api.trending(20)) >= 20 | ||
|
||
|
||
def test_extended_trending(): | ||
assert getTrending(50) == 50 | ||
assert getTrending(100) == 100 | ||
api = TikTokapi("browsermob-proxy/bin/browsermob-proxy", headless=True) | ||
assert len(api.trending(50)) >= 50 | ||
assert len(api.trending(100)) >= 100 |