Skip to content

Commit

Permalink
Added process get_block test
Browse files Browse the repository at this point in the history
  • Loading branch information
coretl committed Oct 18, 2016
1 parent 56d8f83 commit 7b6af1f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_core/test_process.py
Expand Up @@ -37,6 +37,16 @@ def test_add_block(self):
p.add_block(b)
self.assertEqual(p._blocks["name"], b)

def test_get_block(self):
p = Process("proc", MagicMock())
b1 = p.get_block("name1")
self.assertEqual(b1.status, "Waiting for connection...")
self.assertEqual(p.get_block("name1"), b1)
b2 = Block()
b2.set_parent(p, "name2")
p.add_block(b2)
self.assertEqual(p.get_block("name2"), b2)

def test_add_block_calls_handle(self):
s = SyncFactory("sched")
p = Process("proc", s)
Expand Down

0 comments on commit 7b6af1f

Please sign in to comment.