mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-21 23:43:11 +01:00
Merge pull request #909 from koriaf/dev-no-socks-tests
fix(tests): Run tests without the socks components and document their usage
This commit is contained in:
commit
b9855ec83f
@ -80,6 +80,11 @@ Django project.
|
||||
For further installation information see `docs/install.html`
|
||||
and `docs/configuration.html`
|
||||
|
||||
Testing
|
||||
-------
|
||||
|
||||
See quicktest.py for usage details
|
||||
|
||||
Upgrading from previous versions
|
||||
--------------------------------
|
||||
|
||||
@ -111,3 +116,4 @@ We're happy to include any type of contribution! This can be:
|
||||
For more information on contributing, please see the `CONTRIBUTING.rst` file.
|
||||
|
||||
.. _note: http://docs.djangoproject.com/en/dev/ref/databases/#sqlite-string-matching
|
||||
|
||||
|
@ -708,7 +708,10 @@ class GetEmailCCHandling(TestCase):
|
||||
|
||||
# build matrix of test cases
|
||||
case_methods = [c[0] for c in Queue._meta.get_field('email_box_type').choices]
|
||||
case_socks = [False] + [c[0] for c in Queue._meta.get_field('socks_proxy_type').choices]
|
||||
|
||||
# uncomment if you want to run tests with socks - which is much slover
|
||||
# case_socks = [False] + [c[0] for c in Queue._meta.get_field('socks_proxy_type').choices]
|
||||
case_socks = [False]
|
||||
case_matrix = list(itertools.product(case_methods, case_socks))
|
||||
|
||||
# Populate TestCases from the matrix of parameters
|
||||
|
@ -1,3 +1,10 @@
|
||||
"""
|
||||
Usage:
|
||||
$ python -m venv .venv
|
||||
$ source .venv/bin/activate
|
||||
$ pip install -r requirements-testing.txt -r requirements.txt
|
||||
$ python ./quicktest.py
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
import argparse
|
||||
@ -65,7 +72,6 @@ class QuickDjangoTest(object):
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.tests = args
|
||||
self._tests()
|
||||
@ -102,6 +108,7 @@ class QuickDjangoTest(object):
|
||||
if failures:
|
||||
sys.exit(failures)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
"""
|
||||
What do when the user hits this file from the shell.
|
||||
|
Loading…
Reference in New Issue
Block a user