Skip to content

Commit

Permalink
Adjusting tests to match improved logic
Browse files Browse the repository at this point in the history
  • Loading branch information
mottosso committed Jul 9, 2015
1 parent 677226d commit f41cced
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
4 changes: 4 additions & 0 deletions tests/test_blackbox.py
Expand Up @@ -67,6 +67,8 @@ def __init__(self, port):
self.api = pyblish_rpc.client.Proxy(port)

def reset(self):
self.api.reset()

results = list()
plugins = [p for p in self.api.discover()
if p.order < 1]
Expand Down Expand Up @@ -201,6 +203,7 @@ def process(self, instance):

test_failed = False

self.client.reset()
for result in pyblish.logic.process(
func=self.client.process,
plugins=self.client.discover,
Expand Down Expand Up @@ -241,6 +244,7 @@ def repair(self, instance):
pyblish.api.register_plugin(plugin)

results = list()
self.client.reset()
for result in pyblish.logic.process(
func=self.client.process,
plugins=self.client.discover,
Expand Down
11 changes: 0 additions & 11 deletions tests/test_mocking.py
Expand Up @@ -19,17 +19,6 @@ def test_plugins():
pyblish.plugin.process(plugin, context)


@mock.patch("pyblish.api.discover")
def test_service_discover(discover):
"""Mock service discover works well"""
service = pyblish_rpc.service.MockRpcService(delay=1)

# This service mocks the discovery function of Pyblish
# to only provide mocked plug-ins.
service.discover()
assert not discover.called


@mock.patch("time.sleep")
def test_service_sleep(sleep):
# Processing includes an artificial delay via time.sleep
Expand Down

0 comments on commit f41cced

Please sign in to comment.