Merge branch 'fix_test_mommy' into 'master'

Fix tests

See merge request !1
This commit is contained in:
Tyrel Souza 2017-04-01 17:20:07 +00:00
commit 349c0c7c7b

View File

@ -6,17 +6,23 @@ from model_mommy import mommy
# Models
from django.contrib.auth.models import User
from .models import MachineStatus
import models
class MachineTest(TestCase):
def setUp(self):
self.user = mommy.make(User)
self.machinestatus = mommy.make(
MachineStatus,
user=self.user,
self.machine_status = mommy.make(
models.MachineStatus,
make_m2m=True)
self.machine = self.machinestatus.machine
self.machine = self.machine_status.machine
self.machine_note = mommy.make(
models.MachineNote,
user=self.user,
machine=self.machine
)
def test_init(self):
pass
def test_mommy(self):
self.assertEqual(self.machine_status.machine, self.machine)
self.assertEqual(self.machine_note.machine, self.machine)