diff --git a/vendor/registrasion/registrasion/tests/test_credit_note.py b/vendor/registrasion/registrasion/tests/test_credit_note.py index 76d0fc3860491341a4263980385304de6e96d6e7..208f6bba718d5b071126758f676cbedfe488e29c 100644 --- a/vendor/registrasion/registrasion/tests/test_credit_note.py +++ b/vendor/registrasion/registrasion/tests/test_credit_note.py @@ -114,7 +114,7 @@ class CreditNoteTestCase(TestHelperMixin, RegistrationCartTestCase): cn = self._credit_note_for_invoice(invoice.invoice) # That credit note should be in the unclaimed pile - self.assertEquals(1, commerce.CreditNote.unclaimed().count()) + self.assertEqual(1, commerce.CreditNote.unclaimed().count()) # Create a new (identical) cart with invoice cart = TestingCartController.for_user(self.USER_1) @@ -126,7 +126,7 @@ class CreditNoteTestCase(TestHelperMixin, RegistrationCartTestCase): self.assertTrue(invoice2.invoice.is_paid) # That invoice should not show up as unclaimed any more - self.assertEquals(0, commerce.CreditNote.unclaimed().count()) + self.assertEqual(0, commerce.CreditNote.unclaimed().count()) def test_apply_credit_note_generates_new_credit_note_if_overpaying(self): @@ -141,7 +141,7 @@ class CreditNoteTestCase(TestHelperMixin, RegistrationCartTestCase): # There should be one credit note generated out of the invoice. cn = self._credit_note_for_invoice(invoice.invoice) # noqa - self.assertEquals(1, commerce.CreditNote.unclaimed().count()) + self.assertEqual(1, commerce.CreditNote.unclaimed().count()) # Create a new invoice for a cart of half value of inv 1 invoice2 = self._invoice_containing_prod_1(1) @@ -150,7 +150,7 @@ class CreditNoteTestCase(TestHelperMixin, RegistrationCartTestCase): # We generated a new credit note, and spent the old one, # unclaimed should still be 1. - self.assertEquals(1, commerce.CreditNote.unclaimed().count()) + self.assertEqual(1, commerce.CreditNote.unclaimed().count()) credit_note2 = commerce.CreditNote.objects.get( invoice=invoice2.invoice, @@ -158,7 +158,7 @@ class CreditNoteTestCase(TestHelperMixin, RegistrationCartTestCase): # The new credit note should be the residual of the cost of cart 1 # minus the cost of cart 2. - self.assertEquals( + self.assertEqual( invoice.invoice.value - invoice2.invoice.value, credit_note2.value, ) @@ -210,14 +210,14 @@ class CreditNoteTestCase(TestHelperMixin, RegistrationCartTestCase): invoice.refund() - self.assertEquals(1, commerce.CreditNote.unclaimed().count()) + self.assertEqual(1, commerce.CreditNote.unclaimed().count()) cn = self._credit_note_for_invoice(invoice.invoice) cn.refund() # Refunding a credit note should mark it as claimed - self.assertEquals(0, commerce.CreditNote.unclaimed().count()) + self.assertEqual(0, commerce.CreditNote.unclaimed().count()) # Create a new cart with invoice cart = TestingCartController.for_user(self.USER_1) @@ -238,7 +238,7 @@ class CreditNoteTestCase(TestHelperMixin, RegistrationCartTestCase): invoice.refund() - self.assertEquals(1, commerce.CreditNote.unclaimed().count()) + self.assertEqual(1, commerce.CreditNote.unclaimed().count()) cn = self._credit_note_for_invoice(invoice.invoice) @@ -251,7 +251,7 @@ class CreditNoteTestCase(TestHelperMixin, RegistrationCartTestCase): # Creating `invoice_2` will automatically apply `cn`. cn.apply_to_invoice(invoice_2.invoice) - self.assertEquals(0, commerce.CreditNote.unclaimed().count()) + self.assertEqual(0, commerce.CreditNote.unclaimed().count()) # Cannot refund this credit note as it is already applied. with self.assertRaises(ValidationError): @@ -327,13 +327,13 @@ class CreditNoteTestCase(TestHelperMixin, RegistrationCartTestCase): invoice._refresh() # The first invoice should be refunded - self.assertEquals( + self.assertEqual( commerce.Invoice.STATUS_VOID, invoice.invoice.status, ) # Both credit notes should be for the same amount - self.assertEquals( + self.assertEqual( cn.credit_note.value, cn2.credit_note.value, )