def test_run(self): branch = Branch() self.assertTrue(branch.id) self.assertTrue(branch.components) branch2 = Branch(without_httpd=True, without_amqp=True) self.assertNotEqual(len(branch2.components), len(branch.components)) branch.run() for component in branch.components: component.start.assert_called_with()
def start_branch(env, argv=None): env.syncdb(interactive=False) from cyme.branch import Branch ready_event = Event() CYME_INSTANCE_DIR.mkdir() instance = Branch("127.0.0.1:%s" % (CYME_PORT, ), numc=1, ready_event=ready_event) instance.start() ready_event.wait() return instance