-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
15 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
import unittest | ||
from qrgen import create_qr | ||
|
||
|
||
class TestCreateQR(unittest.TestCase): | ||
def test_create_qr(self): | ||
account = "UA683052990000026004026814882" | ||
edrpo = "44327069" | ||
recipient = "ОСББ ТРИПІЛЛЯ-ПАТРІОТИКА" | ||
amount = "UAH3000.00" | ||
purpose = "Добровільний внесок на генератор, квартира XXX" | ||
output_file = "/workspaces/payment-qr-generator/app/qr_code.png" | ||
test_url = "https://bank.gov.ua/qr/QkNCCjAwMgoxClVDVAoK0J7QodCR0JEg0KLQoNCY0J_QhtCb0JvQry3Qn9CQ0KLQoNCG0J7QotCY0JrQkApVQTY4MzA1Mjk5MDAwMDAyNjAwNDAyNjgxNDg4MgpVQUgzMDAwLjAwCjQ0MzI3MDY5CgoK0JTQvtCx0YDQvtCy0ZbQu9GM0L3QuNC5INCy0L3QtdGB0L7QuiDQvdCwINCz0LXQvdC10YDQsNGC0L7RgCwg0LrQstCw0YDRgtC40YDQsCBYWFgK" | ||
|
||
# Call the function | ||
url = create_qr(account, edrpo, recipient, amount, purpose) | ||
url = create_qr(account, edrpo, recipient, amount, purpose, output_file) | ||
|
||
# Assert that the QR code is generated successfully | ||
self.assertEqual(url, test_url) | ||
|
||
# You can add additional assertions here if needed | ||
self.assertTrue(True) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() | ||
unittest.main() |