Ejemplo n.º 1
0
    def test_not_all_filter_conditions_match(self):
        value = proc.num(name='wrong', state=PROCESS_STATE,
                         host_os=self.host_os)

        assert_equal(0, value)
Ejemplo n.º 2
0
    def test_user_filter_works(self):
        value = proc.num(cmdline=PROCESS_COMMAND_LINE, host_os=self.host_os)

        assert_greater(len(self.processes), value)
Ejemplo n.º 3
0
    def test_multiple_filter_conditions_match(self):
        value = proc.num(name=PROCESS_NAME, state=PROCESS_STATE,
                         host_os=self.host_os)

        assert_greater(len(self.processes), value)
Ejemplo n.º 4
0
    def test_name_filter_works(self):
        value = proc.num(name=PROCESS_NAME, host_os=self.host_os)

        assert_greater(len(self.processes), value)
Ejemplo n.º 5
0
    def test_user_filter_works(self):
        value = proc.num(state=PROCESS_STATE, host_os=self.host_os)

        assert_greater(len(self.processes), value)
Ejemplo n.º 6
0
    def test_not_all_filter_conditions_match(self):
        value = proc.num(name='wrong',
                         state=PROCESS_STATE,
                         host_os=self.host_os)

        assert_equal(0, value)
Ejemplo n.º 7
0
    def test_default_matches_all(self):
        value = proc.num(host_os=self.host_os)

        assert_equal(len(self.processes), value)
Ejemplo n.º 8
0
    def test_multiple_filter_conditions_match(self):
        value = proc.num(name=PROCESS_NAME,
                         state=PROCESS_STATE,
                         host_os=self.host_os)

        assert_greater(len(self.processes), value)
Ejemplo n.º 9
0
    def test_user_filter_works(self):
        value = proc.num(cmdline=PROCESS_COMMAND_LINE, host_os=self.host_os)

        assert_greater(len(self.processes), value)
Ejemplo n.º 10
0
    def test_user_filter_works(self):
        value = proc.num(state=PROCESS_STATE, host_os=self.host_os)

        assert_greater(len(self.processes), value)
Ejemplo n.º 11
0
    def test_name_filter_works(self):
        value = proc.num(name=PROCESS_NAME, host_os=self.host_os)

        assert_greater(len(self.processes), value)
Ejemplo n.º 12
0
    def test_default_matches_all(self):
        value = proc.num(host_os=self.host_os)

        assert_equal(len(self.processes), value)