Added some important notes on contributing.md

This commit is contained in:
Genaro Camele 2025-09-25 22:35:31 -03:00
parent 7e8962c622
commit edaf07b45d

View File

@ -81,6 +81,23 @@ To run the tests, clone the repository, and then:
# Run the tests
./runtests.py
---
**Note:**
If your tests require access to the database, do not forget to inherit from `django.test.TestCase`.
For example:
from django.test import TestCase
class MyDatabaseTest(TestCase):
def test_something(self):
# Your test code here
pass
You can reuse existing models defined in `tests/models.py` for your tests.
---
### Test options
Run using a more concise output style.
@ -99,6 +116,10 @@ Shorter form to run the tests for a given test method.
./runtests.py test_this_method
**Note:** If you do not want the output to be captured (for example, to see print statements directly), you can use the `-s` flag:
./runtests.py -s
Note: The test case and test method matching is fuzzy and will sometimes run other tests that contain a partial string match to the given command line input.
### Running against multiple environments