remove mock from task_fixture
This commit is contained in:
7
cli/tests/fixtures/task.py
vendored
7
cli/tests/fixtures/task.py
vendored
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user