Skip to content

Commit

Permalink
fixes #627
Browse files Browse the repository at this point in the history
  • Loading branch information
edsu committed Apr 28, 2022
1 parent f162235 commit 4732c39
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test_twarc2.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,15 @@ def test_ensure_flattened():
twarc.expansions.ensure_flattened([[{"data": {"fake": "list_of_lists"}}]])


def test_ensure_flattened_errors():
"""
Test that ensure_flattened doesn't return tweets only contain errors and
that lack content.
"""
data = {"errors": ["fake error"]}
assert twarc.expansions.ensure_flattened(data) == []


def test_ensure_user_id():
"""
Test _ensure_user_id's ability to discriminate correctly between IDs and
Expand Down

0 comments on commit 4732c39

Please sign in to comment.