示例#1
0
 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),
     )
示例#2
0
文件: sandbox.py 项目: yenNSTH/Tron
    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())
示例#3
0
 def test__ne__(self):
     other = serviceinstance.ServiceInstanceCollection(
         mock.Mock(), self.node_pool, self.context)
     assert_not_equal(self.collection, other)
     other = serviceinstance.ServiceInstanceCollection(
         self.config, mock.Mock(), self.context)
     assert_not_equal(self.collection, other)
示例#4
0
 def test__ne__(self):
     other = serviceinstance.ServiceInstanceCollection(
         mock.Mock(), self.node_pool, self.context)
     assert_not_equal(self.collection, other)
     other = serviceinstance.ServiceInstanceCollection(
         self.config, mock.Mock(), self.context)
     assert_not_equal(self.collection, other)
示例#5
0
    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())
示例#6
0
文件: blocks.py 项目: Yelp/ezio
    def test(self):
        super(TestCase, self).test()

        before_the_block_index = self.result.find('before_the_block')
        in_the_block_index = self.result.find('in_the_block')
        asdf_index = self.result.find('asdf')

        assert_not_equal(before_the_block_index, -1)
        assert_not_equal(in_the_block_index, -1)
        assert_not_equal(asdf_index, -1)

        assert_lt(before_the_block_index, in_the_block_index)
        assert_lt(in_the_block_index, asdf_index)
示例#7
0
文件: node_test.py 项目: kesre/Tron
 def test__eq__false_pub_key_changed(self):
     other_node = build_node(pub_key='something')
     assert_not_equal(other_node, self.node)
示例#8
0
文件: node_test.py 项目: kesre/Tron
 def test__eq__false_config_changed(self):
     other_node = build_node(username='******')
     assert_not_equal(other_node, self.node)
示例#9
0
 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)
示例#10
0
 def test__eq__false_pub_key_changed(self):
     other_node = build_node(pub_key='something')
     assert_not_equal(other_node, self.node)
示例#11
0
 def test__eq__false_pub_key_changed(self):
     other_node = node.Node('localhost', self.ssh_options,
         username='******', name='thename', pub_key="something")
     assert_not_equal(other_node, self.node)
示例#12
0
 def test__eq__not_equal(self):
     assert_not_equal(self.service, None)
     assert_not_equal(self.service, mock.Mock())
     other = service.Service(self.config, mock.Mock())
     assert_not_equal(self.service, other)
示例#13
0
 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))
示例#14
0
 def test__eq__not_equal(self):
     assert_not_equal(self.service, None)
     assert_not_equal(self.service, mock.Mock())
     other = service.Service(self.config, mock.Mock())
     assert_not_equal(self.service, other)
示例#15
0
 def test__eq__false_hostname_changed(self):
     other_node = node.Node('otherhost', self.ssh_options,
         username='******', name='thename')
     assert_not_equal(other_node, self.node)
示例#16
0
 def test__eq__false_ssh_options_changed(self):
     ssh_options = mock.create_autospec(ssh.SSHAuthOptions)
     other_node = node.Node('localhost', ssh_options,
         username='******', name='thename')
     assert_not_equal(other_node, self.node)
示例#17
0
文件: node_test.py 项目: kesre/Tron
 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)
示例#18
0
 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)
示例#19
0
文件: job_test.py 项目: kesre/Tron
 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)
示例#20
0
 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)
示例#21
0
 def test__eq__false_config_changed(self):
     other_node = build_node(username='******')
     assert_not_equal(other_node, self.node)
示例#22
0
 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)
示例#23
0
 def test__eq__false_username_changed(self):
     other_node = node.Node('localhost', self.ssh_options,
         username='******', name='thename')
     assert_not_equal(other_node, self.node)