From 82247f01ae6998c15445e6814ed21f89e349993b Mon Sep 17 00:00:00 2001 From: zubair-ce07 Date: Wed, 27 Sep 2023 12:28:35 +0500 Subject: [PATCH] fix: fixed issue in code --- ecommerce/extensions/api/v2/tests/views/test_vouchers.py | 2 +- ecommerce/extensions/voucher/tests/test_utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ecommerce/extensions/api/v2/tests/views/test_vouchers.py b/ecommerce/extensions/api/v2/tests/views/test_vouchers.py index aadb573d9b7..8bed8b0d908 100644 --- a/ecommerce/extensions/api/v2/tests/views/test_vouchers.py +++ b/ecommerce/extensions/api/v2/tests/views/test_vouchers.py @@ -78,7 +78,7 @@ def test_list(self): actual_codes = [datum['code'] for datum in response.data['results']] expected_codes = [voucher.code for voucher in vouchers] - self.assertListEqual(actual_codes, expected_codes) + self.assertEqual(actual_codes, expected_codes[::-1]) def test_list_with_code_filter(self): """ Verify the endpoint list all vouchers, filtered by the specified code. """ diff --git a/ecommerce/extensions/voucher/tests/test_utils.py b/ecommerce/extensions/voucher/tests/test_utils.py index 5d51bc9de49..fec1f36d917 100644 --- a/ecommerce/extensions/voucher/tests/test_utils.py +++ b/ecommerce/extensions/voucher/tests/test_utils.py @@ -255,11 +255,11 @@ def test_create_voucher_with_long_name(self): }) trimmed = ( 'This Is A Really Really Really Really Really Really Long ' - 'Voucher Name That Needs To Be Trimmed To Fit Into The Name Column Of Th' + 'Voucher Name That Needs To Be Trimmed To Fit Into The ' ) vouchers = create_vouchers(**self.data) voucher = vouchers[0] - self.assertEqual(voucher.name, trimmed) + self.assertEqual(voucher.name, trimmed + voucher.code) @ddt.data( {'end_datetime': ''},