Replace assert statements with appropriate assert* method.
Replace 'assert' with 'assert*' method.
Convert tests.unit.forms.widget_tests to use TestCase class.
Convert bankcard tests to use TestCase.
Convert tests.unit.logging_tests to use TestCase.
06c2441 changed the way actions are submitted for on the dashboard's
order list view. This commit updates the test to match the new
behaviour.
I'd also argue that the two test methods test different aspects of the
same thing, so I merged them, which saves us one (relatively slow) test
run.
We only needed it because Django 1.4 shipped with a pretty old version
of six. Support for that has been removed, and Django 1.5 ships with six
1.6.1, which is more current than we required.
This nicely avoids an issue with django-extra-views pinning a six
version which caused the sandbox build to fail:
https://travis-ci.org/tangentlabs/django-oscar/jobs/32223978#L971
Correct amount calculation when creating payment events in dashboard
The final line price was calculated as qty * qty * unit price, as the
line price was multiplied with the quantity for a second time. That's no
good.
Reported in #1442. Fixes #1442.
This allows updating more than one order's status, similar to how line
statuses of an order can be updated.
This commit is a squashed version of the changes in #1391.
Reported by @martymcmahon in #1354.
Also added tests for changing the line and order status. Unfortunately,
I had to introduce test-global status pipelines instead of using
overridden_settings(). Even though I both applied it in setUp() and the
individual tests, the forms were rendered with no statuses available.
Fixes #1354.
Disentangle Django's test client from Oscar's custom webtest class
Before this change, it was conflating WebTest functionality with the
Django test client. This change removes the Django test client
functionality (namely, the login function which was being automatically
called).
A shed-load of tests are adjusted to work with this change.
This almost completes the work for #826 - only a couple more references
to the Django client are left in the test codebase.
Previously, the test suite ran with a custom user model for Django >=
1.5, but it didn't subclass Oscar's AbstractUser. This commit adjusts
the custom user model to subclass Oscar's so we can test functionality
within the custom user class.
This does require a change to the way tests authenticate as we don't
actually use the username field.
To be more consistent with how access to products is handled in the
permission based dashboard, access to orders is now more permissive. As
long as one order line's partner has the current user in it's users,
access is granted.
This allows updating code in both places, if necessary. Getting Django
1.5 support would be painful otherwise. This also removes the circular
dependency of django-oscar-testsupport on Oscar.
The requirements were merged. The imports were updated
accordingly. Unused imports in the touched files were removed. No
further changes.
moved order summary from orders to dashboard index
I moved the ``OderSummaryView`` from the order section in the
dashboard to the main dashboard index and merged it with the
``IndexView``. I removed the summary template and merged the
relevant data into the dashboard template.