Changeset View
Changeset View
Standalone View
Standalone View
looper/tests/test_moneyfield.py
| Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | def test_changed_data(self): | ||||
| 'status': [order.status], | 'status': [order.status], | ||||
| 'name': [order.name], | 'name': [order.name], | ||||
| 'payment_method': [order.payment_method_id], | 'payment_method': [order.payment_method_id], | ||||
| 'collection_method': [order.collection_method], | 'collection_method': [order.collection_method], | ||||
| 'currency': [order.currency], | 'currency': [order.currency], | ||||
| 'price': [order.price.decimals_string], | 'price': [order.price.decimals_string], | ||||
| 'tax': [order.tax.decimals_string], | 'tax': [order.tax.decimals_string], | ||||
| 'tax_type': [''], | 'tax_type': [''], | ||||
| 'tax_region': [''], | 'tax_rate': [order.tax_rate], | ||||
| 'tax_country': [''], | |||||
| 'paid_at_0': [''], | 'paid_at_0': [''], | ||||
| 'paid_at_1': [''], | 'paid_at_1': [''], | ||||
| 'retry_after_0': [''], | 'retry_after_0': [''], | ||||
| 'retry_after_1': [''], | 'retry_after_1': [''], | ||||
| 'email': [order.email], | 'email': [order.email], | ||||
| 'vat_number': [order.vat_number], | |||||
| 'billing_address': [order.billing_address], | 'billing_address': [order.billing_address], | ||||
| 'transaction_set-TOTAL_FORMS': ['0'], | 'transaction_set-TOTAL_FORMS': ['0'], | ||||
| 'transaction_set-INITIAL_FORMS': ['0'], | 'transaction_set-INITIAL_FORMS': ['0'], | ||||
| 'transaction_set-MIN_NUM_FORMS': ['0'], | 'transaction_set-MIN_NUM_FORMS': ['0'], | ||||
| 'transaction_set-MAX_NUM_FORMS': ['0'], | 'transaction_set-MAX_NUM_FORMS': ['0'], | ||||
| '_continue': ['Save and continue editing'], | '_continue': ['Save and continue editing'], | ||||
| } | } | ||||
| ) | ) | ||||
| request_files = MultiValueDict({}) | request_files = MultiValueDict({}) | ||||
| form = forms.OrderAdminForm(request_post, request_files, instance=order) | form = forms.OrderAdminForm(request_post, request_files, instance=order) | ||||
| form.full_clean() | form.full_clean() | ||||
| self.assertEqual(['user'], form.changed_data) | self.assertEqual(['user'], form.changed_data) | ||||