Merge branch 'master' of https://github.com/aptivate/econsensus
Merge remote-tracking branch 'upstream/master'
Merge remote-tracking branch 'upstream/master'
Merge remote-tracking branch 'upstream/master'
Merge remote-tracking branch 'upstream/master'
Merge remote-tracking branch 'upstream/master'
Merge remote-tracking branch 'upstream/master'
Merge remote-tracking branch 'upstream/master'
Merge branch 'develop'
Don't bother doing collectstatic for dev environments.
Accepted supervacuo's pull request plus a minor fix to make it
handle the Cancel scenario, and a couple of test rebases now that we're
redirecting to the list for the status that was actually used. Pull
request https://github.com/aptivate/econsensus/pull/131, resolves
ticket https://github.com/aptivate/econsensus/issues/111 |
https://aptivate.kanbantool.com/boards/5986-econsensus#tasks-1511769
Philip's pull request
https://github.com/aptivate/econsensus/pull/117 plus some minor changes.
https://aptivate.kanbantool.com/boards/5986-econsensus#tasks-1544325
Import tidyups.
Speed up test_get_author_name from 1.097 seconds to 0.319 seconds.

Explanation of improvements:
- Move test method from the old-style test class which indirectly
subclasses publicweb/tests/open_consent_test_case.py's
EconsensusFixtureTestCase to a clean new subclass of django's TestCase.
Each test that lives under EconsensusFixtureTestCase or one of its
subclasses will be slow because each time it runs, it will a) load
fixture data (of which you'll probably only use a small subset, if any,
in your test) and b) use the django test client to log in one of the
users,
whether you need that user to be logged in for your test or not (see
EconsensusFixtureTestCase.setUp()). A test client login/get/post is
slow,
as is loading fixtures.
- I don't need a logged in user for this new test, so I don't do that.
- I do need a Feedback (which requires a Decision), and an User. I can
  use relevant Factory
classes (see tests/factories.py) to build objects for me to use. These
factories takes care of populating all the required fields on the
object for me, so that my test code remains uncluttered by irrelevant
details. I can use a factory to build me an User and a couple of
Feedback
objects. I don't care about what sort of User I get, so I don't bother
overriding whatever defaults the UserFactory sets. I do want to specify
the author for my Feedbacks, so I can supply my own values to the
FeedbackFactory. Note that the DecisionFactory replaces
open_consent_test_case.py's
make_decision method in our test. They both achieve the same effect
but make_decision relies on a) the use of a fixture and b) that the
data in that fixture is appropriate.
Philip's new test from
https://github.com/aptivate/econsensus/pull/120/files for kanban ticket
https://aptivate.kanbantool.com/boards/5986-econsensus#tasks-1544325
Converted new test to be speedier.
Feedback rating names need to be known to the internationalisation
system, since they can appear in the UI, but they shouldn't be
translated within the Feedback model class itself. (Fix for
http://aptivate.kanbantool.com/boards/5986-econsensus#tasks-1656489)
Don't override LOGIN_URL and LOGIN_REDIRECT_URL in local settings.
This is a fix for
https://aptivate.kanbantool.com/boards/5986-econsensus#tasks-1385283
but the value for LOGIN_REDIRECT_URL now used is the one suggested by
https://aptivate.kanbantool.com/boards/5986-econsensus#tasks-1251883
Stop importing private_settings when we don't use it.
Convert this to use sqlite instead of mysql and stop setting LOGIN_URL
and LOGIN_REDIRECT_URL (we stopped setting this in local_settings.py.dev
ages ago).