Fixing some of the tests due to the line breaks added by spotless

This commit is contained in:
Vitor Pamplona
2024-01-06 15:11:12 -05:00
parent 6e99e6f4a2
commit eb08d485e1
2 changed files with 29 additions and 44 deletions
@@ -704,7 +704,7 @@ class RichTextParserTest {
"RegularText()", "RegularText()",
"RegularText(Network statistics)", "RegularText(Network statistics)",
"RegularText()", "RegularText()",
"RegularText(New events witnessed (top 110 relays) )", "RegularText(New events witnessed (top 110 relays))",
"RegularText()", "RegularText()",
"RegularText(Kind, count, (% count), size, (% size))", "RegularText(Kind, count, (% count), size, (% size))",
"RegularText(1, 207.9K, (28.8%), 458.02MB, (9.2%))", "RegularText(1, 207.9K, (28.8%), 458.02MB, (9.2%))",
@@ -939,15 +939,15 @@ class RichTextParserTest {
"🚫 (31) 👊🏻 (31) 😡 (31) 🌎 (31) 👁 (30) 🗞 (30) 🍀 (30) 🍽 (29) 🐸 (29) 🥚 (29) " + "🚫 (31) 👊🏻 (31) 😡 (31) 🌎 (31) 👁 (30) 🗞 (30) 🍀 (30) 🍽 (29) 🐸 (29) 🥚 (29) " +
"💩 (29) ✊🏾 (29) 😮 (29) 🌡 (29) 🙃 (28) 🔔 (28) 🇻🇪 (28) 💦 (28) 🎯 (28) 🎨 (28) " + "💩 (29) ✊🏾 (29) 😮 (29) 🌡 (29) 🙃 (28) 🔔 (28) 🇻🇪 (28) 💦 (28) 🎯 (28) 🎨 (28) " +
"🍛 (28) 🖼 (27) ☝🏻 (27) 🛑 (27) 🙄 (27) 🧑🏻‍🤝‍🧑🏽 (27) 🌈 (27) 🥂 (26) 🇫🇮 (26) 🎥 (26) " + "🍛 (28) 🖼 (27) ☝🏻 (27) 🛑 (27) 🙄 (27) 🧑🏻‍🤝‍🧑🏽 (27) 🌈 (27) 🥂 (26) 🇫🇮 (26) 🎥 (26) " +
"😬 (26) 🥲 (25) 🦾 (24) 🤜 (24) 🙂 (24) 🖕 (24) 😩 (24) )", "😬 (26) 🥲 (25) 🦾 (24) 🤜 (24) 🙂 (24) 🖕 (24) 😩 (24))",
"RegularText()", "RegularText()",
"RegularText(Zap economy)", "RegularText(Zap economy)",
"RegularText()", "RegularText()",
"RegularText(⚡41.7M sats (₿0.417) )", "RegularText(⚡41.7M sats (₿0.417))",
"RegularText(1,816 zappers & 920 zapped (unique pubkeys))", "RegularText(1,816 zappers & 920 zapped (unique pubkeys))",
"RegularText(🌩️ 33,248 zaps, 1,253 sats per zap (avg))", "RegularText(🌩️ 33,248 zaps, 1,253 sats per zap (avg))",
"RegularText()", "RegularText()",
"RegularText(Most followed )", "RegularText(Most followed)",
"RegularText()", "RegularText()",
"HashTag(#1)", "HashTag(#1)",
"RegularText(30%)", "RegularText(30%)",
@@ -4003,17 +4003,17 @@ class RichTextParserTest {
"RegularText(New events inspected today: 720.71K (4.85GB))", "RegularText(New events inspected today: 720.71K (4.85GB))",
"RegularText(Average events inspected per second: 8.34)", "RegularText(Average events inspected per second: 8.34)",
"RegularText(Uptime: Server 99.93%, NostrInspector: 99.93%)", "RegularText(Uptime: Server 99.93%, NostrInspector: 99.93%)",
"RegularText(Spam estimate: )", "RegularText(Spam estimate:)",
"RegularText(74.12 %)", "RegularText(74.12 %)",
"RegularText()", "RegularText()",
"RegularText(About the NostrInspector Report)", "RegularText(About the NostrInspector Report)",
"RegularText()", "RegularText()",
"RegularText(✅ The 24 Hour NostrInspector Report is generated by listening for new events on the top relays using the Nostr Protocol. The statistics report that )", "RegularText(✅ The 24 Hour NostrInspector Report is generated by listening for new events on the top relays using the Nostr Protocol. The statistics report that)",
"RegularText(it generates includes de data layer as well as the social layer.)", "RegularText(it generates includes de data layer as well as the social layer.)",
"RegularText(💜 To support this free effort share, like, comment or zap.)", "RegularText(💜 To support this free effort share, like, comment or zap.)",
"RegularText(🫂 Thank you 🙏 )", "RegularText(🫂 Thank you 🙏)",
"RegularText()", "RegularText()",
"RegularText(🕵️ @nostrin \"The Nostr Inspector\" )", "RegularText(🕵️ @nostrin \"The Nostr Inspector\")",
"Bech(npub17m7f7q08k4x746s2v45eyvwppck32dcahw7uj2mu5txuswldgqkqw9zms7)", "Bech(npub17m7f7q08k4x746s2v45eyvwppck32dcahw7uj2mu5txuswldgqkqw9zms7)",
) )
@@ -28,42 +28,27 @@ import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class) @RunWith(AndroidJUnit4::class)
class EventSigCheck { class EventSigCheck {
val payload1 = val payload1 =
""" "[\"EVENT\",\"40b9\",{\"id\":\"48a72b485d38338627ec9d427583551f9af4f016c739b8ec0d6313540a8b12cf\"," +
[ "\"kind\":1,\"pubkey\":\"3d842afecd5e293f28b6627933704a3fb8ce153aa91d790ab11f6a752d44a42d\"," +
"EVENT", "\"created_at\":1677940007,\"content\":" +
"40b9", "\"I got asked about follower count again today. Why does my follower count go down when " +
{ "I delete public relays (in our list) and replace them with filter.nostr.wine? \\n\\nIll " +
"id":"48a72b485d38338627ec9d427583551f9af4f016c739b8ec0d6313540a8b12cf", "give you one final explanation to rule them all. First, lets go over how clients calculate " +
"kind":1, "your follower count.\\n\\n1. Your client sends a request to all your connected relays asking " +
"pubkey":"3d842afecd5e293f28b6627933704a3fb8ce153aa91d790ab11f6a752d44a42d", "for accounts who follow you\\n2. Relays answer back with the events requested\\n3. The client " +
"created_at":1677940007, "aggregates the event total and displays it\\n\\nEach relay has a set limit on how many stored " +
"content":"I got asked about follower count again today. Why does my follower "events it will return per request. For some relays its 500, others 1000, some as high as 5000. " +
count go down when I delete public relays (in our list) and replace them with "Lets say for simplicity that all your public relays use 500 as their limit. If you ask 10 " +
filter.nostr.wine? \\n\\nIll give you one final explanation to rule them all. "relays for your followers the max possible answer you can get is 5000. That wont change if " +
First, lets go over how clients calculate your follower count.\\n\\n1. Your "you have 20,000 followers or 100,000. You may get back a “different” 5000 each time, but youll " +
client sends a request to all your connected relays asking for accounts who "still cap out at 5000 because that is the most events your client will receive.\u2028\u2028Our " +
follow you\\n2. Relays answer back with the events requested\\n3. The client "limit on filter.nostr.wine is 2000 events. If you replace 10 public relays with only " +
aggregates the event total and displays it\\n\\nEach relay has a set limit on "filter.nostr.wine, the MOST followers you will ever get back from our filter relay is 2000. " +
how many stored events it will return per request. For some relays its 500, "That doesnt mean you only have 2000 followers or that your reach is reduced in any way.\\n\\nAs " +
others 1000, some as high as 5000. Lets say for simplicity that all your "long as you are writing to and reading from the same public relays, neither your reach nor any " +
public relays use 500 as their limit. If you ask 10 relays for your followers "content was lost. That concludes my TED talk. I hope you all have a fantastic day and weekend.\"," +
the max possible answer you can get is 5000. That wont change if you have "\"tags\":[],\"sig\":\"dcaf8ab98bb9179017b35bd814092850d1062b26c263dff89fb1ae8c019a324139d1729012d" +
20,000 followers or 100,000. You may get back a different 5000 each time, "9d05ff0a517f76b1117d869b2cc7d36bea8aa5f4b94c5e2548aa8\"}]"
but youll still cap out at 5000 because that is the most events your client
will receive.\u2028\u2028Our limit on filter.nostr.wine is 2000 events. If you
replace 10 public relays with only filter.nostr.wine, the MOST followers you
will ever get back from our filter relay is 2000. That doesnt mean you only
have 2000 followers or that your reach is reduced in any way.\\n\\nAs long as
you are writing to and reading from the same public relays, neither your reach
nor any content was lost. That concludes my TED talk. I hope you all have a
fantastic day and weekend.",
"tags":[
],
"sig":"dcaf8ab98bb9179017b35bd814092850d1062b26c263dff89fb1ae8c019a324139d1729012d9d05ff0a517f76b1117d869b2cc7d36bea8aa5f4b94c5e2548aa8"
}
]
"""
@Test @Test
fun testUnicode2028and2029ShouldNotBeEscaped() { fun testUnicode2028and2029ShouldNotBeEscaped() {