Rename the product Scrobbled
Display name only: UI, docs, API title, dashboards, hashtag and User-Agent. Identifiers (package, metrics, env vars, SCROBBLER_CONFIG) are unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9e4218f11b
commit
65ee13fa65
64 files changed
+130
-130
No files matched your search
@@ -79,18 +79,18 @@ def test_build_content_shape():
|
||||
"My week in music: 312 plays",
|
||||
"Top artists: 1. Radiohead (48) 2. Björk (31) 3. Portishead (22)",
|
||||
"Most played: Reckoner by Radiohead (12 plays)",
|
||||
"#Scrobbler",
|
||||
"#Scrobbled",
|
||||
]
|
||||
assert html.startswith("<p><strong>My week in music: 312 plays</strong></p>")
|
||||
assert "<ol><li>Radiohead" in html
|
||||
assert "<em>Reckoner</em> by Radiohead" in html
|
||||
assert html.endswith("<p>#Scrobbler</p>")
|
||||
assert html.endswith("<p>#Scrobbled</p>")
|
||||
assert "<script" not in html # sanity: nothing unescaped ever reaches the markup
|
||||
|
||||
|
||||
def test_build_content_without_any_plays_this_week():
|
||||
text, html = build_content(0, [], [])
|
||||
assert text == "My week in music: 0 plays\n#Scrobbler"
|
||||
assert text == "My week in music: 0 plays\n#Scrobbled"
|
||||
assert "<ol>" not in html # no top-artists list when there isn't one
|
||||
assert "Most played" not in html
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ def test_urls_with_credentials_are_refused():
|
||||
|
||||
@pytest.fixture
|
||||
def local_client():
|
||||
client = Client("Scrobbler/test", insecure_testing=True)
|
||||
client = Client("Scrobbled/test", insecure_testing=True)
|
||||
yield client
|
||||
client.close()
|
||||
|
||||
@@ -74,7 +74,7 @@ def local_client():
|
||||
def test_get_json_and_user_agent(local_client, remote):
|
||||
remote.routes["/doc"] = (200, {}, {"id": "x"})
|
||||
assert local_client.get_json(remote.url("/doc")) == {"id": "x"}
|
||||
assert remote.requests[0]["headers"]["User-Agent"] == "Scrobbler/test"
|
||||
assert remote.requests[0]["headers"]["User-Agent"] == "Scrobbled/test"
|
||||
assert "application/activity+json" in remote.requests[0]["headers"]["Accept"]
|
||||
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ def test_post_sent_after_30_seconds(fed_ctx, posting_user):
|
||||
activity = db.session.get(FederationActivity, post.activity_id)
|
||||
assert activity.activity_type == "Create"
|
||||
assert activity.document["object"]["tag"] == [
|
||||
{"type": "Hashtag", "name": "#Scrobbler"},
|
||||
{"type": "Hashtag", "name": "#Scrobbled"},
|
||||
{"type": "Hashtag", "name": "#NowPlaying"},
|
||||
]
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ def test_is_public_or_unlisted():
|
||||
|
||||
|
||||
def test_hashtag():
|
||||
assert vocab.hashtag("Scrobbler") == {"type": "Hashtag", "name": "#Scrobbler"}
|
||||
assert vocab.hashtag("Scrobbled") == {"type": "Hashtag", "name": "#Scrobbled"}
|
||||
|
||||
|
||||
def test_note():
|
||||
@@ -172,14 +172,14 @@ def test_note():
|
||||
url=f"{BASE}/post.html?id=1",
|
||||
to=["FOLLOWERS"],
|
||||
cc=[],
|
||||
tags=["Scrobbler"],
|
||||
tags=["Scrobbled"],
|
||||
)
|
||||
assert doc["type"] == "Note"
|
||||
assert doc["attributedTo"] == f"{BASE}/users/alice"
|
||||
assert doc["content"] == "<p>Hello</p>"
|
||||
assert doc["contentMap"] == {"en": "<p>Hello</p>"}
|
||||
assert (doc["to"], doc["cc"]) == (["FOLLOWERS"], [])
|
||||
assert doc["tag"] == [{"type": "Hashtag", "name": "#Scrobbler"}]
|
||||
assert doc["tag"] == [{"type": "Hashtag", "name": "#Scrobbled"}]
|
||||
assert doc["sensitive"] is False
|
||||
assert "@context" not in doc # carried by the wrapping Create instead
|
||||
assert "attachment" not in doc # omitted entirely, not an empty list, when there's none
|
||||
|
||||
@@ -50,7 +50,7 @@ def test_publish_creates_a_post_and_a_create_activity(fed_ctx, user, metric_delt
|
||||
assert activity.document["object"]["type"] == "Note"
|
||||
assert activity.document["object"]["content"] == "<p>312 plays</p>"
|
||||
assert activity.document["object"]["contentMap"] == {"en": "<p>312 plays</p>"}
|
||||
assert activity.document["object"]["tag"] == [{"type": "Hashtag", "name": "#Scrobbler"}]
|
||||
assert activity.document["object"]["tag"] == [{"type": "Hashtag", "name": "#Scrobbled"}]
|
||||
assert activity.public is False # followers-only, the default
|
||||
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ def https_server(app, tls_files):
|
||||
@pytest.fixture
|
||||
def network(https_server, api_app):
|
||||
return pylast._Network(
|
||||
name="Scrobbler",
|
||||
name="Scrobbled",
|
||||
homepage=f"https://{https_server}",
|
||||
ws_server=(https_server, "/2.0/"),
|
||||
api_key=api_app.api_key,
|
||||
|
||||
Reference in new issue
Block a user