Fix market tests

This commit is contained in:
Mark Veidemanis 2022-04-23 15:02:01 +01:00
parent 75062514c9
commit ad21f6fb67
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 10 additions and 10 deletions

View File

@ -114,13 +114,10 @@ $PAYMENT$
payment_details_text = self.markets.format_payment_details("GBP", payment_details) payment_details_text = self.markets.format_payment_details("GBP", payment_details)
ad_text = self.markets.format_ad("XMR", "GBP", payment_details_text) ad_text = self.markets.format_ad("XMR", "GBP", payment_details_text)
expected = """* Set **Country of recipient's bank** to **"United Kingdom"** expected = """* Set **Country of recipient's bank** to **"United Kingdom"**
* Recipient name: Mark Veidemanis Payment details will be released after verification has passed.
* Sort code: **02-03-04** If you've already completed verification, they will be sent immediately.
* Account number: **0023-0045**
* Please send in **GBP**
* Set **Company name** to **"PATHOGEN LIMITED"**""" * Set **Company name** to **"PATHOGEN LIMITED"**"""
print("EXPECT", ad_text)
self.assertEqual(ad_text, expected) self.assertEqual(ad_text, expected)
def test_format_payment_details(self): def test_format_payment_details(self):
@ -130,9 +127,12 @@ $PAYMENT$
} }
payment_details_text = self.markets.format_payment_details("GBP", payment_details) payment_details_text = self.markets.format_payment_details("GBP", payment_details)
expected = """* Recipient name: Mark Veidemanis expected = """Payment details will be released after verification has passed.
* Sort code: **02-03-04** If you've already completed verification, they will be sent immediately."""
* Account number: **0023-0045**
* Please send in **GBP**"""
print("EXPECT DETAIL", payment_details_text)
self.assertEqual(payment_details_text, expected) self.assertEqual(payment_details_text, expected)
expected_real = """* Sort code: **02-03-04**
* Account number: **0023-0045**
Please send in GBP."""
payment_details_text_real = self.markets.format_payment_details("GBP", payment_details, real=True)
self.assertEqual(payment_details_text_real, expected_real)