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:
Garret Wassermann 2020-11-24 17:32:52 -05:00 committed by GitHub
commit b9855ec83f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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.