https://github.com/marcanuy/factoryboy_examples
How to set up a many-to-one relationship in Factoryboy
https://github.com/marcanuy/factoryboy_examples
django factoryboy python unittest
Last synced: about 2 months ago
JSON representation
How to set up a many-to-one relationship in Factoryboy
- Host: GitHub
- URL: https://github.com/marcanuy/factoryboy_examples
- Owner: marcanuy
- Created: 2018-04-17T14:48:59.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-17T15:24:15.000Z (about 8 years ago)
- Last Synced: 2025-10-23T23:34:04.451Z (8 months ago)
- Topics: django, factoryboy, python, unittest
- Language: Python
- Homepage: https://simpleit.rocks/setting-up-a-factory-for-one-to-many-relationships-in-factoryboy/
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
FACTORYBOY EXAMPLES
=======================
Guide to set up a one-to-many relationship in Factoryboy + Django
following the guide at:
# Install
mkdir ~/.virtualenvs
mkvirtualenv -p /usr/bin/python3.6 ~/.virtualenvs/factoryboy_examples
Activate it:
source ~/.virtualenvs/factoryboy_examples/bin/activate
(factoryboy_examples)$
Install requirements:
pip install -r requirements.txt
# Test it
$ python manage.py tests
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
...
----------------------------------------------------------------------
Ran 3 tests in 0.095s
OK
Destroying test database for alias 'default'...