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': ''},