Remove <br/> from safe string indicating that CSRF cooking is missing.
[larjonas-mediagoblin.git] / mediagoblin / tools / testing.py
blob7f2bcbfb955a0cdfde0e54ed5169d4273b1839ff
1 # GNU MediaGoblin -- federated, autonomous media hosting
2 # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU Affero General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU Affero General Public License for more details.
14 # You should have received a copy of the GNU Affero General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 from mediagoblin.tools import common
18 from mediagoblin.tools.template import clear_test_template_context
19 from mediagoblin.tools.mail import EMAIL_TEST_INBOX, EMAIL_TEST_MBOX_INBOX
21 def _activate_testing():
22 """
23 Call this to activate testing in util.py
24 """
26 common.TESTS_ENABLED = True
28 def clear_test_buckets():
29 """
30 We store some things for testing purposes that should be cleared
31 when we want a "clean slate" of information for our next round of
32 tests. Call this function to wipe all that stuff clean.
34 Also wipes out some other things we might redefine during testing,
35 like the jinja envs.
36 """
37 global SETUP_JINJA_ENVS
38 SETUP_JINJA_ENVS = {}
40 global EMAIL_TEST_INBOX
41 global EMAIL_TEST_MBOX_INBOX
42 EMAIL_TEST_INBOX = []
43 EMAIL_TEST_MBOX_INBOX = []
45 clear_test_template_context()