Skip to content

Commit cb76425

Browse files
Pbezerra-devherbetyp
Pbezerra-dev
authored andcommitted
add model bakery
1 parent 68ac385 commit cb76425

File tree

4 files changed

+50
-10
lines changed

4 files changed

+50
-10
lines changed

Pipfile

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ pytest-django = "*"
1010
pytest-cov = "*"
1111
codecov = "*"
1212
pre-commit = "*"
13+
model-bakery = "*"
1314

1415
[packages]
1516
django = "*"

Pipfile.lock

+46-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
[![Codecov](https://codecov.io/gh/Pbezerra-dev/pythonprodjango/branch/master/graph/badge.svg)](https://codecov.io/gh/Pbezerra-dev/pythonprodjango)
33
[![Updates](https://pyup.io/repos/github/Pbezerra-dev/pythonprodjango/shield.svg)](https://pyup.io/repos/github/Pbezerra-dev/pythonprodjango/)
44
[![Python 3](https://pyup.io/repos/github/Pbezerra-dev/pythonprodjango/python-3-shield.svg)](https://pyup.io/repos/github/Pbezerra-dev/pythonprodjango/)
5+
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
56
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
67

78

pypro/aperitivos/tests/tests_video.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import pytest
22
from django.urls import reverse
3+
from model_bakery import baker
34

45
from pypro.aperitivos.models import Video
56
from pypro.django_assertions import assert_contains
67

78

89
@pytest.fixture
910
def video(db):
10-
vd = Video(slug='motivacao', titulo='Vídeo Aperitivo: Motivação', vimeo_id='434538400')
11-
vd.save()
12-
return vd
11+
return baker.make(Video)
1312

1413

1514
@pytest.fixture

0 commit comments

Comments
 (0)