예제 #1
0
def test_negative_list_by_name():
    """Test Fact List failure

    :id: bd56d27e-59c0-4f35-bd53-2999af7c6946

    :expectedresults: Fact List is not displayed
    """
    assert Fact().list(options={'search': f'fact={gen_string("alpha")}'}) == []
예제 #2
0
def test_positive_list_by_name(fact):
    """Test Fact List

    :id: 83794d97-d21b-4482-9522-9b41053e595f

    :expectedresults: Fact List is displayed

    :parametrized: yes
    """
    facts = Fact().list(options={'search': f'fact={fact}'})
    assert facts[0]['fact'] == fact
예제 #3
0
    def test_negative_list_by_name(self):
        """Test Fact List failure

        @Feature: Fact - List Negative

        @Assert: Fact List is not displayed

        """
        fact = gen_string('alpha')
        args = {'search': "fact='%s'" % fact}
        self.assertEqual(
            Fact().list(args), [], 'No records should be returned')
예제 #4
0
    def test_negative_list_by_name(self):
        """Test Fact List failure

        @id: bd56d27e-59c0-4f35-bd53-2999af7c6946

        @Assert: Fact List is not displayed

        """
        fact = gen_string('alpha')
        args = {'search': "fact='%s'" % fact}
        self.assertEqual(Fact().list(args), [],
                         'No records should be returned')
예제 #5
0
    def test_list_fail(self, fact):
        """
        @Feature: Fact - List Negative
        @Test: Test Fact List failure
        @Assert: Fact List is not displayed
        """

        args = {
            'search': "fact='%s'" % fact,
        }
        self.assertEqual(Fact().list(args).stdout, [],
                         "No records should be returned")
예제 #6
0
    def test_negative_list_by_name(self):
        """Test Fact List failure

        :id: bd56d27e-59c0-4f35-bd53-2999af7c6946

        :expectedresults: Fact List is not displayed


        :CaseImportance: Critical
        """
        fact = gen_string('alpha')
        args = {'search': f"fact={fact}"}
        self.assertEqual(Fact().list(args), [], 'No records should be returned')
예제 #7
0
    def test_positive_list_by_name(self):
        """Test Fact List

        @Feature: Fact - List Positive

        @Assert: Fact List is displayed

        """
        for fact in ('uptime', 'uptime_days', 'uptime_seconds', 'memoryfree',
                     'ipaddress'):
            with self.subTest(fact):
                args = {'search': "fact='%s'" % fact}
                facts = Fact().list(args)
                self.assertEqual(facts[0]['fact'], fact)
예제 #8
0
    def test_positive_list_by_name(self):
        """Test Fact List

        @id: 83794d97-d21b-4482-9522-9b41053e595f

        @Assert: Fact List is displayed

        """
        for fact in ('uptime', 'uptime_days', 'uptime_seconds', 'memoryfree',
                     'ipaddress'):
            with self.subTest(fact):
                args = {'search': "fact='%s'" % fact}
                facts = Fact().list(args)
                self.assertEqual(facts[0]['fact'], fact)
예제 #9
0
    def test_list_success(self, fact):
        """
        @Feature: Fact - List Positive
        @Test: Test Fact List
        @Assert: Fact List is displayed
        """

        args = {
            'search': "fact='%s'" % fact,
        }

        result = Fact().list(args)
        stdout = result.stdout

        self.assertEqual(stdout[0]['fact'], fact)
예제 #10
0
    def test_positive_list_by_name(self):
        """Test Fact List

        :id: 83794d97-d21b-4482-9522-9b41053e595f

        :expectedresults: Fact List is displayed


        :CaseImportance: Critical
        """
        for fact in ('uptime', 'uptime_days', 'uptime_seconds', 'memoryfree', 'ipaddress'):
            with self.subTest(fact):
                args = {'search': f"fact={fact}"}
                facts = Fact().list(args)
                self.assertEqual(facts[0]['fact'], fact)