Fix tests
This commit is contained in:
parent
e8261ef423
commit
139abd7668
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user