Update Discord trade listings

This commit is contained in:
2026-11-21 00:42:57 +01:00
parent d29892eac5
commit 6b152854bd
21 changed files with 4702 additions and 4149 deletions
+16
View File
@@ -1,9 +1,25 @@
import unittest
from bundle_quotes import extract_bundle_quotes
from extract_exchange_quotes import extract_quotes, parse_side
class ExchangeQuoteTests(unittest.TestCase):
def test_stat_specific_inventory_is_not_a_base_variant_quote(self):
rows = [
{"author_hash": "a", "offer": "Homura Evo (SSS RNG)",
"lf": "my Homura Evo for Alucard Evo", "mlf": ""},
{"author_hash": "b", "offer": "Homura Evo (SSS RNG) | Homura Evo",
"lf": "my Homura Evo for Alucard Evo", "mlf": ""},
{"author_hash": "c", "offer": "Shiny Poseidon Evo | 14x Dark Mage Evo (A+/SSS/SS) | 2x Chuuni Evo",
"lf": "My Shiny Poseidon Evo, 1 Dark Mage Evo, 2x Chuuni Evo for Homura Evo",
"mlf": ""},
{"author_hash": "d", "offer": "2x Homura Evo 1 s,s,A, Alucard Evo",
"lf": "", "mlf": "my 2x Homura Evo for Aizen Evo"},
]
self.assertEqual([q["source_row"] for q in extract_quotes(rows)], [3])
self.assertEqual(extract_bundle_quotes(rows), [])
def test_only_exact_variant_and_quantity(self):
self.assertEqual(parse_side("my 2 Shiny Aizen Evo"),
("Shiny Aizen Evo", 2, "my"))