Repository: django-wiki/django-wiki

Issue:
Typo in testproject/settings/customauthuser.py
There is a typo in https://github.com/django-wiki/django-wiki/blob/db7456725dcbc4809e4a3f9c6c354626700b7eff/testproject/testproject/settings/customauthuser.py#L14


**$ pip list**
```
Package             Version    Location
------------------- ---------- ---------------------------------------------------------
appdirs             1.4.4
asgiref             3.3.1
attrs               20.3.0
beautifulsoup4      4.9.3
black               20.8b1
bleach              3.1.5
cfgv                3.2.0
click               7.1.2
coverage            5.4
cssselect           1.1.0
dataclasses         0.8
distlib             0.3.1
Django              3.1.5
django-classy-tags  2.0.0
django-functest     1.0.4
django-js-asset     1.2.2
django-mptt         0.11.0
django-nyt          1.1.6
django-sekizai      2.0.0
django-webtest      1.9.7
EasyProcess         0.3
entrypoints         0.3
filelock            3.0.12
flake8              3.7.9
furl                2.1.0
identify            1.5.13
importlib-metadata  3.4.0
importlib-resources 5.1.0
lxml                4.6.2
Markdown            3.2.2
mccabe              0.6.1
more-itertools      8.6.0
mypy-extensions     0.4.3
nodeenv             1.5.0
orderedmultidict    1.0.1
packaging           20.9
pathspec            0.8.1
Pillow              8.1.0
pip                 21.0
pkg-resources       0.0.0
pluggy              0.13.1
pre-commit          2.10.0
py                  1.10.0
pycodestyle         2.5.0
pyflakes            2.1.1
pyparsing           3.0.0b2
pyquery             1.4.3
pytest              5.3.5
pytest-cov          2.11.1
pytest-django       3.10.0
pytest-pythonpath   0.7.3
pytz                2020.5
PyVirtualDisplay    2.0
PyYAML              5.4.1
regex               2020.11.13
selenium            3.141.0
setuptools          52.0.0
six                 1.15.0
sorl-thumbnail      12.7.0
soupsieve           2.1
sqlparse            0.4.1
toml                0.10.2
typed-ast           1.4.2
typing-extensions   3.7.4.3
urllib3             1.26.3
virtualenv          20.4.0
waitress            1.4.4
wcwidth             0.2.5
webencodings        0.5.1
WebOb               1.8.6
WebTest             2.0.35
wheel               0.36.2
wiki                0.7.3      /django-wiki/src
zipp                3.4.0
```

**> Does the bug happen with a checkout of django-wiki's master branch?**

Yes

```bash
$ git log --oneline
db745672 (HEAD -> master, origin/master, origin/HEAD) Merge pull request #1102 from benjaoming/new-translations

```
**> An example of how to reproduce the bug.**

```bash
$ python manage.py runserver --settings testproject.settings.customauthuser

```

**Error log**

```python

File "../django-wiki/testproject/testproject/settings/customauthuser.py", line 16, in <module>
    "wiki.tests.testdata",
TypeError: must be str, not list

```

**Possible solution**

```diff
--- a/testproject/testproject/settings/customauthuser.py
+++ b/testproject/testproject/settings/customauthuser.py
@@ -11,7 +11,7 @@ DATABASES = {
     }
 }
 
-INSTALLED_APPS = PROJECT_DIR + [
+INSTALLED_APPS += [
     # Test application for testing custom users
     "wiki.tests.testdata",
 ]

```

Also, could you say what is the purpose of this file and how to actually use it in my tests?


Discussion:

Resolving patch:
diff --git a/testproject/testproject/settings/customauthuser.py b/testproject/testproject/settings/customauthuser.py
--- a/testproject/testproject/settings/customauthuser.py
+++ b/testproject/testproject/settings/customauthuser.py
@@ -1,6 +1,12 @@
 import os  # noqa @UnusedImport
+import sys
 
 from .base import *  # noqa @UnusedWildImport
+from .dev import *
+
+# Append testdata path
+
+sys.path.append(os.path.join(os.path.dirname(os.path.dirname(PROJECT_DIR)), "tests"))
 
 DATABASES = {
     "default": {
@@ -11,9 +17,9 @@
     }
 }
 
-INSTALLED_APPS = PROJECT_DIR + [
+INSTALLED_APPS = INSTALLED_APPS + [
     # Test application for testing custom users
-    "wiki.tests.testdata",
+    "testdata",
 ]
 
 AUTH_USER_MODEL = "testdata.CustomUser"


Test patch: