remove mock from task_fixture

This commit is contained in:
tamarrow
2016-04-05 18:01:41 -07:00
parent 72899f118b
commit a317e0a28f
2 changed files with 7 additions and 7 deletions

View File

@@ -1,6 +1,4 @@
from dcos.mesos import Slave, Task
import mock
from dcos.mesos import Task
def task_fixture():
@@ -43,9 +41,6 @@ def task_fixture():
]
}, None)
task.user = mock.Mock(return_value='root')
slave = Slave({"hostname": "mock-hostname"}, None, None)
task.slave = mock.Mock(return_value=slave)
return task

View File

@@ -1,5 +1,6 @@
import datetime
from dcos.mesos import Slave
from dcoscli import tables
import mock
@@ -14,8 +15,12 @@ from ..fixtures.task import browse_fixture, task_fixture
def test_task_table():
task = task_fixture()
task.user = mock.Mock(return_value='root')
slave = Slave({"hostname": "mock-hostname"}, None, None)
task.slave = mock.Mock(return_value=slave)
_test_table(tables.task_table,
[task_fixture()],
[task],
'tests/unit/data/task.txt')