wimglenn / djangorestframework-queryfields

Allows clients to control which fields will be sent in the API response
http://djangorestframework-queryfields.readthedocs.io/
MIT License
216 stars 16 forks source link

Documentation on test is missing #24

Closed gustabot42 closed 5 years ago

gustabot42 commented 5 years ago

dev requirements:

pip install mock_django

manage.py:

#!/usr/bin/env python
import os
import sys

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_settings")

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)
wimglenn commented 5 years ago

Nope, writing a manage.py is not needed, because I use pytest-django plugin. Other dev requirements (including the mock_django) are listed in a setuptools extra, here. So, the correct way is simply:

pip install --editable ".[dev]"
pytest

I've now added some dev instructions onto the landing page in https://github.com/wimglenn/djangorestframework-queryfields/commit/b0aed3eb51625b20d187aa2ca1ec5a2982b979e2