Fix CSV export to export followers handle instead of following user handle (#509)

This commit is contained in:
TAKAHASHI Shuuji 2023-02-15 01:34:07 +09:00 committed by GitHub
parent 2cb125845b
commit cc0bbfb93b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 0 deletions

View File

@ -64,3 +64,23 @@ def test_export_following(
response.content.strip()
== b"Account address,Show boosts,Notify on new posts,Languages\r\ntest@remote.test,true,false,"
)
@pytest.mark.django_db
def test_export_followers(
client_with_identity: Client,
identity: Identity,
identity2: Identity,
stator: StatorRunner,
httpx_mock: HTTPXMock,
):
"""
Validates the "export a CSV of your follows" functionality works
"""
# Follow remote_identity
IdentityService(identity2).follow(identity)
# Download the CSV
response = client_with_identity.get("/settings/import_export/followers.csv")
assert response.status_code == 200
assert response.content.strip() == b"Account address\r\ntest@example2.com"