def restart_trond(self): old_pid = self.sandbox.get_trond_pid() self.sandbox.shutdown_trond() wait_on_proc_terminate(self.sandbox.get_trond_pid()) self.sandbox.trond() assert_not_equal(old_pid, self.sandbox.get_trond_pid())
def test__eq__false(self): config = mock.Mock(agent=True, identities=['one', 'two']) second_config = mock.Mock(agent=True, identities=['two']) assert_not_equal( ssh.SSHAuthOptions.from_config(config), ssh.SSHAuthOptions.from_config(second_config), )
def test_open(self): # Not yet in cache fh_wrapper = self.manager.open(self.file1.name) assert_in(fh_wrapper.name, self.manager.cache) # Should now be in cache fh_wrapper2 = self.manager.open(self.file1.name) # Same wrapper assert_equal(fh_wrapper, fh_wrapper2) # Different wrapper assert_not_equal(fh_wrapper, self.manager.open(self.file2.name))
def test__eq__false(self): first = job.Job("jobname", 'scheduler', action_runner=mock.Mock()) second = job.Job("jobname", 'scheduler', action_runner=mock.Mock()) assert_not_equal(first, second)
def test__eq__false_ssh_options_changed(self): other_node = build_node() other_node.conch_options = mock.create_autospec(ssh.SSHAuthOptions) assert_not_equal(other_node, self.node)
def test__eq__false_pub_key_changed(self): other_node = build_node(pub_key='something') assert_not_equal(other_node, self.node)
def test__eq__false_config_changed(self): other_node = build_node(username='******') assert_not_equal(other_node, self.node)
def test__eq__false(self): first = actioncommand.SubprocessActionRunnerFactory('a', 'b') second = actioncommand.SubprocessActionRunnerFactory('a', 'c') assert_not_equal(first, second) assert_not_equal(first, None) assert_not_equal(first, actioncommand.NoActionRunnerFactory)
def test__ne__(self): other = mock.MagicMock(base='one/two', parts=['three']) assert_not_equal(self.path, other)