Пример #1
0
 def test_find_missing_task(self):
     task = Hellbox.find_task_by_name("bazzio")
     Hellbox._warn = Hellbox.warn
     Hellbox.warn = Mock()
     task.run()
     assert Hellbox.warn.called
     Hellbox.warn = Hellbox._warn
Пример #2
0
 def test_find_missing_task(self):
     task = Hellbox.find_task_by_name("bazzio")
     Hellbox._warn = Hellbox.warn
     Hellbox.warn = Mock()
     task.run()
     assert Hellbox.warn.called
     Hellbox.warn = Hellbox._warn
Пример #3
0
 def test_find_missing_task(self):
     task = Hellbox.find_task_by_name('bazzio')
     assert type(task) is NullTask
     Hellbox._warn = Hellbox.warn
     Hellbox.warn = Mock()
     task.run()
     assert Hellbox.warn.called
     Hellbox.warn = Hellbox._warn
Пример #4
0
 def test_with(self):
     with Hellbox("foo") as task:
         assert task
         assert type(task) is Task
     assert Hellbox.find_task_by_name("foo")
Пример #5
0
 def test_find_task_by_name(self):
     Hellbox.add_task(Task("foo"))
     assert Hellbox.find_task_by_name("foo")
Пример #6
0
 def test_with(self):
     with Hellbox("foo") as task:
         assert task
         assert type(task) is Task
     assert Hellbox.find_task_by_name("foo")
Пример #7
0
 def test_find_task_by_name(self):
     Hellbox.add_task(Task("foo"))
     assert Hellbox.find_task_by_name("foo")