-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(maxitwit_test.py): make tests great again!
- Loading branch information
1 parent
13f8b4a
commit 22474c0
Showing
1 changed file
with
9 additions
and
7 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 |
---|---|---|
@@ -1,14 +1,15 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
MiniTwit Tests | ||
~~~~~~~~~~~~~~ | ||
MiniTwit Tests | ||
~~~~~~~~~~~~~~ | ||
Tests a MiniTwit application. | ||
Tests a MiniTwit application. | ||
:refactored: (c) 2024 by HelgeCPH from Armin Ronacher's original unittest version | ||
:copyright: (c) 2010 by Armin Ronacher. | ||
:license: BSD, see LICENSE for more details. | ||
:refactored: (c) 2024 by HelgeCPH from Armin Ronacher's original unittest version | ||
:copyright: (c) 2010 by Armin Ronacher. | ||
:license: BSD, see LICENSE for more details. | ||
""" | ||
|
||
import requests | ||
import json | ||
import base64 | ||
|
@@ -274,7 +275,8 @@ def test_api_a_unfollows_b(): | |
query = {"no": 20, "latest": 11} | ||
response = requests.get(url, params=query, headers=HEADERS) | ||
assert response.ok | ||
assert "b" not in response.json()["follows"] | ||
assert "[email protected]" not in response.json()["follows"] | ||
assert "[email protected]" in response.json()["follows"] | ||
|
||
# verify that latest was updated | ||
response = requests.get(f"{API_URL}:{API_PORT}/latest", headers=HEADERS) | ||
|