Show data sources and the central bank list in Settings (refs #22)
A "Dati" section lists every external source with its state, last answer and the reason it is off (Alpaca without the paper keys, FRED and Finnhub without theirs), links the 30-day quality report, and edits the Fed/ECB meeting list; a list that does not parse is refused with an example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1e71038209
commit
4a65d4060f
4 files changed
+99
-2
No files matched your search
@@ -47,6 +47,25 @@ public sealed class MarketDataServerTests
|
||||
var report = await server.TextAsync("/api/data/quality?format=md");
|
||||
StringAssert.Contains(report, "# Qualità dei dati");
|
||||
StringAssert.Contains(report, "| alpaca | no |");
|
||||
|
||||
// The settings page says which source is off and why, and edits the central bank list.
|
||||
var page = await server.TextAsync("/impostazioni");
|
||||
StringAssert.Contains(page, "Alpaca (azioni, conto di prova)");
|
||||
StringAssert.Contains(page, "mancano le chiavi del conto di prova Alpaca");
|
||||
StringAssert.Contains(page, "FED 2026-12-09");
|
||||
using (var wrong = await server.PostFormAsync("/impostazioni", "/azioni/impostazioni/calendar.central_banks", ("valore", "FED il 9 dicembre"),
|
||||
("ritorno", "/impostazioni#dati")))
|
||||
{
|
||||
Assert.AreEqual("/impostazioni?errore=riunioni#dati", ServerHarness.Location(wrong));
|
||||
}
|
||||
|
||||
using (var right = await server.PostFormAsync("/impostazioni", "/azioni/impostazioni/calendar.central_banks", ("valore", "FED 2027-01-27\r\nBCE 2027-02-04"),
|
||||
("ritorno", "/impostazioni#dati")))
|
||||
{
|
||||
Assert.AreEqual("/impostazioni#dati", ServerHarness.Location(right));
|
||||
}
|
||||
|
||||
StringAssert.Contains(await server.TextAsync("/impostazioni"), "BCE 2027-02-04");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
|
||||
Reference in new issue
Block a user