Beispiel #1
0
    def test_get_attribute_by_id_with_bad_id(self):
        a1 = Attribute('a', 'b')
        a2 = Attribute('b', 'b2')
        attributes = [a1, a2]
        report = Report('redfang', attributes=attributes)

        a = report.get_attribute_by_id('a')
        self.assertEqual(a.value, 'b')

        bad_a = report.get_attribute_by_id('id_that_does_not_exist')
        self.assertIsNone(bad_a)
    def test_get_attribute_by_id_with_bad_id(self):
        a1 = Attribute('a', 'b')
        a2 = Attribute('b', 'b2')
        attributes = [a1, a2]
        report = Report('redfang', attributes=attributes)

        a = report.get_attribute_by_id('a')
        self.assertEqual(a.value, 'b')

        bad_a = report.get_attribute_by_id('id_that_does_not_exist')
        self.assertIsNone(bad_a)
Beispiel #3
0
    def test_get_attribute_by_id_with_bad_id(self):
        a1 = Attribute('a', 'b')
        a2 = Attribute('b', 'b2')
        attributes = [a1, a2]
        report = Report('redfang', attributes=attributes)

        a = report.get_attribute_by_id('a')
        assert a.value == 'b'

        bad_a = report.get_attribute_by_id('id_that_does_not_exist')
        assert bad_a is None
    def test_get_attribute_by_id_with_bad_id(self):
        a1 = Attribute("a", "b")
        a2 = Attribute("b", "b2")
        attributes = [a1, a2]
        report = Report("redfang", attributes=attributes)

        a = report.get_attribute_by_id("a")
        self.assertEqual(a.value, "b")

        bad_a = report.get_attribute_by_id("id_that_does_not_exist")
        self.assertIsNone(bad_a)
    def test_get_attribute_by_id(self):
        a = Attribute('a', 'b')
        a2 = Attribute('b', 'b2')
        attributes = [a, a2]
        r = Report('redfang', attributes=attributes)

        a1 = r.get_attribute_by_id('a')

        self.assertEqual(a, a1)
Beispiel #6
0
    def test_get_attribute_by_id(self):
        a = Attribute('a', 'b')
        a2 = Attribute('b', 'b2')
        attributes = [a, a2]
        r = Report('redfang', attributes=attributes)

        a1 = r.get_attribute_by_id('a')

        self.assertEqual(a, a1)
    def test_get_attribute_by_id(self):
        a = Attribute("a", "b")
        a2 = Attribute("b", "b2")
        attributes = [a, a2]
        r = Report("redfang", attributes=attributes)

        a1 = r.get_attribute_by_id("a")

        self.assertEqual(a, a1)