예제 #1
0
    def test_it_should_get_the_link_layer_address_of_tap2(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)

        self.assertEqual('00:50:56:c0:00:08', c.test_network().tp2.ll_addr)
예제 #2
0
    def test_it_should_build_a_test_network(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)
        n = c.build_test_network()

        self.assertTrue(isinstance(n, TestNetwork))
예제 #3
0
    def test_it_should_configure_the_prefix_size_of_link_c(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)

        self.assertEqual(64, c.test_network().link3.prefix_size)
예제 #4
0
    def test_it_should_give_the_runner_a_pointer_back_to_the_configuration(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options, MockInterface())
        r = c.build_runner()

        self.assertEqual(c, r._Runner__config)
예제 #5
0
    def test_it_should_identify_a_subset_of_test_suites_to_run_without_optionals(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg --skip-optional host")

        c = Configuration(args, options)
        s = c.test_plan()

        self.assertEqual(5, len(s))
예제 #6
0
    def test_it_should_pass_configuration_into_the_test_network(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)
        n = c.build_test_network()

        self.assertTrue(isinstance(c.test_network(), TestNetworkConfiguration))
예제 #7
0
    def test_it_should_get_the_link_local_ip_of_tn4(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)

        self.assertEqual(2, len(c.test_network().tn4.if0_ips))
        self.assertTrue(IPAddress.identify("fe80::7a2b:cbff:feef:0105") in c.test_network().tn4.if0_ips)
예제 #8
0
    def test_it_should_get_the_global_ip_of_tn4(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)

        self.assertEqual(2, len(c.test_network().tn4.if0_ips))
        self.assertTrue(IPAddress.identify("2012:6d77:7269::ef:0105") in c.test_network().tn4.if0_ips)
예제 #9
0
    def test_it_should_build_a_report(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)
        r = c.build_report()

        self.assertTrue(isinstance(r, Report))
예제 #10
0
    def test_it_should_get_the_physical_device_for_tap2(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)

        self.assertEqual('vmnet8', c.test_network().tp2.dev)
예제 #11
0
    def test_it_should_build_a_runner(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options, MockInterface())
        r = c.build_runner()

        self.assertTrue(isinstance(r, Runner))
예제 #12
0
    def test_it_should_configure_the_prefix_of_link_b(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)

        self.assertEqual("2012:6970:7636:0000:0000:0000:0000:0000",
                         c.test_network().link2.prefix)
예제 #13
0
    def test_it_should_pass_configuration_into_the_test_network(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)
        n = c.build_test_network()

        self.assertTrue(isinstance(c.test_network(), TestNetworkConfiguration))
예제 #14
0
    def test_it_should_build_a_test_network(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)
        n = c.build_test_network()

        self.assertTrue(isinstance(n, TestNetwork))
예제 #15
0
    def test_it_should_build_a_runner(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options, MockInterface())
        r = c.build_runner()

        self.assertTrue(isinstance(r, Runner))
예제 #16
0
    def test_it_should_build_a_report(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)
        r = c.build_report()

        self.assertTrue(isinstance(r, Report))
예제 #17
0
    def test_it_should_get_the_global_ip_of_tr3if1(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)

        self.assertEqual(2, len(c.test_network().tr1.if0_ips))
        self.assertTrue(IPAddress.identify("2012:6970:7636::fe:104") in c.test_network().tr3.if1_ips)
        self.assertTrue(IPAddress.identify("fe80::7a2b:cbff:fefe:104") in c.test_network().tr3.if1_ips)
예제 #18
0
    def test_it_should_not_run_test_suites_that_do_not_match_the_suite_pattern(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg --suite TestSuiteA host")

        c = Configuration(args, options)
        s = c.test_plan()

        self.assertEqual(1, len(s))
        self.assertEqual(ConfigurationTestCase.TestSuiteA, s[0])
        
예제 #19
0
파일: runner.py 프로젝트: bobdoah/veripy
    def test_it_should_count_the_test_cases_to_be_run(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg host")
        
        c = MockConfiguration(args, options, MockInterface())
        c.mock_test_plan = [RunnerTestCase.TestSuiteA, RunnerTestCase.TestSuiteB]

        r = c.build_runner()

        self.assertEqual(5, len(r.test_cases()))
예제 #20
0
    def test_it_should_raise_if_no_device_is_specified(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg")

        try:
            Configuration(args, options)

            self.fail("expected an InvalidConfigurationError to be thrown")
        except InvalidConfigurationError, e:
            self.assertEqual("no device class specified", e.message)
예제 #21
0
    def test_it_should_raise_if_no_device_is_specified(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg")

        try:
            Configuration(args, options)
            
            self.fail("expected an InvalidConfigurationError to be thrown")
        except InvalidConfigurationError, e:
            self.assertEqual("no device class specified", e.message)
예제 #22
0
    def test_it_should_raise_if_an_unknown_protocol_is_specified(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg -p RAID host")

        try:
            Configuration(args, options)

            self.fail("expected an InvalidConfigurationError to be thrown")
        except InvalidConfigurationError, e:
            self.assertEqual("unknown protocol 'RAID' specified", e.message)
예제 #23
0
    def test_it_should_raise_if_an_unknown_device_is_specified(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg dog")

        try:
            Configuration(args, options)

            self.fail("expected an InvalidConfigurationError to be thrown")
        except InvalidConfigurationError, e:
            self.assertEqual("'dog' is not a known type of device", e.message)
예제 #24
0
    def test_it_should_identify_an_output_formatter(self):
        options, args = sampleOptions("--configuratio tests/mocks/veripy.cfg -fX out.xml host")

        c = Configuration(args, options)

        self.assertEqual(1, len(c.formatters))
        self.assertTrue("X" in c.formatters.keys())
        self.assertEqual("XMLFormatter", c.formatters['X'][0].__name__)
        self.assertEqual("out.xml", c.formatters['X'][1])
예제 #25
0
    def test_it_should_identify_a_subset_of_test_suites_to_run_without_optionals(
            self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg --skip-optional host")

        c = Configuration(args, options)
        s = c.test_plan()

        self.assertEqual(5, len(s))
예제 #26
0
    def test_it_should_give_the_runner_a_pointer_back_to_the_configuration(
            self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options, MockInterface())
        r = c.build_runner()

        self.assertEqual(c, r._Runner__config)
예제 #27
0
    def test_it_should_not_run_test_suites_that_do_not_match_the_suite_pattern(
            self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg --suite TestSuiteA host")

        c = Configuration(args, options)
        s = c.test_plan()

        self.assertEqual(1, len(s))
        self.assertEqual(ConfigurationTestCase.TestSuiteA, s[0])
예제 #28
0
    def test_it_should_get_the_global_ip_of_tn4(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)

        self.assertEqual(2, len(c.test_network().tn4.if0_ips))
        self.assertTrue(
            IPAddress.identify("2012:6d77:7269::ef:0105") in
            c.test_network().tn4.if0_ips)
예제 #29
0
    def test_it_should_read_configuration_from_the_specified_file(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)
        
        self.assertTrue(isinstance(c, Configuration))
        self.assertTrue(c.has_section('test-section'))
        self.assertEqual(1, len(c.keys('test-section')))
        self.assertTrue(c.has_option('test-section', 'key'))
        self.assertEqual('value', c.get('test-section', 'key'))
예제 #30
0
    def test_it_should_get_the_link_local_ip_of_tn4(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)

        self.assertEqual(2, len(c.test_network().tn4.if0_ips))
        self.assertTrue(
            IPAddress.identify("fe80::7a2b:cbff:feef:0105") in
            c.test_network().tn4.if0_ips)
예제 #31
0
    def test_it_should_raise_if_an_unknown_device_is_specified(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg dog")

        try:
            Configuration(args, options)

            self.fail("expected an InvalidConfigurationError to be thrown")
        except InvalidConfigurationError, e:
            self.assertEqual("'dog' is not a known type of device", e.message)
예제 #32
0
    def test_it_should_identify_a_subset_of_test_suites_to_run_2_of_2(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg switch-enterprise")

        c = Configuration(args, options)
        s = c.test_plan()

        self.assertEqual(3, len(s))
        self.assertEqual(ConfigurationTestCase.TestSuiteA, s[0])
        self.assertEqual(ConfigurationTestCase.TestSuiteB, s[1])
        self.assertEqual(ConfigurationTestCase.TestSuiteC, s[2])
예제 #33
0
    def test_it_should_raise_if_an_unknown_protocol_is_specified(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg -p RAID host")

        try:
            Configuration(args, options)

            self.fail("expected an InvalidConfigurationError to be thrown")
        except InvalidConfigurationError, e:
            self.assertEqual("unknown protocol 'RAID' specified", e.message)
예제 #34
0
    def test_it_should_identify_an_output_formatter(self):
        options, args = sampleOptions(
            "--configuratio tests/mocks/veripy.cfg -fX out.xml host")

        c = Configuration(args, options)

        self.assertEqual(1, len(c.formatters))
        self.assertTrue("X" in c.formatters.keys())
        self.assertEqual("XMLFormatter", c.formatters['X'][0].__name__)
        self.assertEqual("out.xml", c.formatters['X'][1])
예제 #35
0
    def test_it_should_read_an_ordered_list_of_all_known_devices(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)
        k = c.device_klasses()

        self.assertEqual(10, len(k))
        self.assertEqual('host', k[0])
        self.assertEqual('switch-consumer', k[1])
        self.assertEqual('switch-enterprise', k[2])
        self.assertEqual('router', k[3])
예제 #36
0
    def test_it_should_read_configuration_from_the_specified_file(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)

        self.assertTrue(isinstance(c, Configuration))
        self.assertTrue(c.has_section('test-section'))
        self.assertEqual(1, len(c.keys('test-section')))
        self.assertTrue(c.has_option('test-section', 'key'))
        self.assertEqual('value', c.get('test-section', 'key'))
예제 #37
0
    def test_it_should_pass_configuration_into_the_build_report(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg --title Report --vendor veripy --device Desktop --notes Lorem. host")

        c = Configuration(args, options)
        r = c.build_report()

        self.assertEqual("host", r.klass)
        self.assertEqual("Report", r.title)
        self.assertEqual("veripy", r.vendor)
        self.assertEqual("Desktop", r.device)
        self.assertEqual("Lorem.", r.notes)
예제 #38
0
    def test_it_should_identify_a_subset_of_test_suites_to_run_with_optional_protocols(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg -p switch-is-a-router switch-enterprise")

        c = Configuration(args, options)
        s = c.test_plan()

        self.assertEqual(4, len(s))
        self.assertEqual(ConfigurationTestCase.TestSuiteA, s[0])
        self.assertEqual(ConfigurationTestCase.TestSuiteB, s[1])
        self.assertEqual(ConfigurationTestCase.TestSuiteC, s[2])
        self.assertEqual(ConfigurationTestCase.TestSuiteF, s[3])
예제 #39
0
    def test_it_should_identify_a_subset_of_test_suites_to_run_2_of_2(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg switch-enterprise")

        c = Configuration(args, options)
        s = c.test_plan()

        self.assertEqual(3, len(s))
        self.assertEqual(ConfigurationTestCase.TestSuiteA, s[0])
        self.assertEqual(ConfigurationTestCase.TestSuiteB, s[1])
        self.assertEqual(ConfigurationTestCase.TestSuiteC, s[2])
예제 #40
0
파일: runner.py 프로젝트: bobdoah/veripy
    def test_it_should_initialise_from_a_configuration(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg host")

        c = MockConfiguration(args, options, MockInterface())
        c.mock_test_plan = [RunnerTestCase.TestSuiteA, RunnerTestCase.TestSuiteB]

        r = c.build_runner()

        self.assertTrue(isinstance(r.report, Report))
        self.assertEqual(2, len(r.test_plan))
        self.assertTrue(isinstance(r.test_network, TestNetwork))
예제 #41
0
    def test_it_should_read_an_ordered_list_of_all_known_test_suites(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)
        s = c.test_suites()

        self.assertEqual(6, len(s))
        self.assertEqual('ipv6-basic-specification', s[0])
        self.assertEqual('ipv6-default-address-selection', s[1])
        self.assertEqual('icmpv6', s[2])
        self.assertEqual('neighbour-discovery', s[3])
예제 #42
0
    def test_it_should_read_an_ordered_list_of_all_known_test_suites(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)
        s = c.test_suites()

        self.assertEqual(6, len(s))
        self.assertEqual('ipv6-basic-specification', s[0])
        self.assertEqual('ipv6-default-address-selection', s[1])
        self.assertEqual('icmpv6', s[2])
        self.assertEqual('neighbour-discovery', s[3])
예제 #43
0
    def test_it_should_read_an_ordered_list_of_all_known_devices(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)
        k = c.device_klasses()

        self.assertEqual(10, len(k))
        self.assertEqual('host', k[0])
        self.assertEqual('switch-consumer', k[1])
        self.assertEqual('switch-enterprise', k[2])
        self.assertEqual('router', k[3])
예제 #44
0
파일: runner.py 프로젝트: farikonsec/veripy
    def test_it_should_count_the_test_cases_to_be_run(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg host")

        c = MockConfiguration(args, options, MockInterface())
        c.mock_test_plan = [
            RunnerTestCase.TestSuiteA, RunnerTestCase.TestSuiteB
        ]

        r = c.build_runner()

        self.assertEqual(5, len(r.test_cases()))
예제 #45
0
    def test_it_should_pass_configuration_into_the_build_report(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg --title Report --vendor veripy --device Desktop --notes Lorem. host"
        )

        c = Configuration(args, options)
        r = c.build_report()

        self.assertEqual("host", r.klass)
        self.assertEqual("Report", r.title)
        self.assertEqual("veripy", r.vendor)
        self.assertEqual("Desktop", r.device)
        self.assertEqual("Lorem.", r.notes)
예제 #46
0
파일: runner.py 프로젝트: bobdoah/veripy
    def test_it_should_run_the_test_cases_in_the_order_provided(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg host")

        c = MockConfiguration(args, options, MockInterface())
        c.mock_test_plan = [RunnerTestCase.TestSuiteA, RunnerTestCase.TestSuiteB]

        r = c.build_runner()

        self.assertEqual(RunnerTestCase.TestSuiteA.TestCase1, r.test_cases()[0])
        self.assertEqual(RunnerTestCase.TestSuiteA.TestCase2, r.test_cases()[1])
        self.assertEqual(RunnerTestCase.TestSuiteA.TestCase3, r.test_cases()[2])
        self.assertEqual(RunnerTestCase.TestSuiteB.TestCase1, r.test_cases()[3])
        self.assertEqual(RunnerTestCase.TestSuiteB.TestCase2, r.test_cases()[4])
예제 #47
0
    def test_it_should_get_the_global_ip_of_tr3if1(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)

        self.assertEqual(2, len(c.test_network().tr1.if0_ips))
        self.assertTrue(
            IPAddress.identify("2012:6970:7636::fe:104") in
            c.test_network().tr3.if1_ips)
        self.assertTrue(
            IPAddress.identify("fe80::7a2b:cbff:fefe:104") in
            c.test_network().tr3.if1_ips)
예제 #48
0
파일: runner.py 프로젝트: bobdoah/veripy
    def test_it_should_not_run_test_cases_that_do_not_match_the_case_rx(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg --case TestCase1 host")

        c = MockConfiguration(args, options, MockInterface())
        c.mock_test_plan = [RunnerTestCase.TestSuiteA, RunnerTestCase.TestSuiteB]

        r = c.build_runner()

        r.next_case()
        self.assertEqual(RunnerTestCase.TestSuiteA.TestCase1, r.current_test_case())

        r.next_case()
        self.assertEqual(RunnerTestCase.TestSuiteB.TestCase1, r.current_test_case())
        
예제 #49
0
파일: runner.py 프로젝트: farikonsec/veripy
    def test_it_should_initialise_from_a_configuration(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg host")

        c = MockConfiguration(args, options, MockInterface())
        c.mock_test_plan = [
            RunnerTestCase.TestSuiteA, RunnerTestCase.TestSuiteB
        ]

        r = c.build_runner()

        self.assertTrue(isinstance(r.report, Report))
        self.assertEqual(2, len(r.test_plan))
        self.assertTrue(isinstance(r.test_network, TestNetwork))
예제 #50
0
    def test_it_should_identify_a_subset_of_test_suites_to_run_with_optional_protocols(
            self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg -p switch-is-a-router switch-enterprise"
        )

        c = Configuration(args, options)
        s = c.test_plan()

        self.assertEqual(4, len(s))
        self.assertEqual(ConfigurationTestCase.TestSuiteA, s[0])
        self.assertEqual(ConfigurationTestCase.TestSuiteB, s[1])
        self.assertEqual(ConfigurationTestCase.TestSuiteC, s[2])
        self.assertEqual(ConfigurationTestCase.TestSuiteF, s[3])
예제 #51
0
파일: runner.py 프로젝트: farikonsec/veripy
    def test_it_should_not_run_test_cases_that_do_not_match_the_case_rx(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg --case TestCase1 host")

        c = MockConfiguration(args, options, MockInterface())
        c.mock_test_plan = [
            RunnerTestCase.TestSuiteA, RunnerTestCase.TestSuiteB
        ]

        r = c.build_runner()

        r.next_case()
        self.assertEqual(RunnerTestCase.TestSuiteA.TestCase1,
                         r.current_test_case())

        r.next_case()
        self.assertEqual(RunnerTestCase.TestSuiteB.TestCase1,
                         r.current_test_case())
예제 #52
0
파일: runner.py 프로젝트: bobdoah/veripy
    def test_it_should_step_through_the_test_cases_in_order(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg host")

        c = MockConfiguration(args, options, MockInterface())
        c.mock_test_plan = [RunnerTestCase.TestSuiteA, RunnerTestCase.TestSuiteB]

        r = c.build_runner()
        s = [   [None, None],
                [RunnerTestCase.TestSuiteA, RunnerTestCase.TestSuiteA.TestCase1],
                [RunnerTestCase.TestSuiteA, RunnerTestCase.TestSuiteA.TestCase2],
                [RunnerTestCase.TestSuiteA, RunnerTestCase.TestSuiteA.TestCase3],
                [RunnerTestCase.TestSuiteB, RunnerTestCase.TestSuiteB.TestCase1],
                [RunnerTestCase.TestSuiteB, RunnerTestCase.TestSuiteB.TestCase2] ]

        for step in s:
            self.assertEqual(step[0], r.current_test_suite())
            self.assertEqual(step[1], r.current_test_case())

            print "+ next_case()"
            r.next_case()
예제 #53
0
파일: runner.py 프로젝트: farikonsec/veripy
    def test_it_should_run_the_test_cases_in_the_order_provided(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg host")

        c = MockConfiguration(args, options, MockInterface())
        c.mock_test_plan = [
            RunnerTestCase.TestSuiteA, RunnerTestCase.TestSuiteB
        ]

        r = c.build_runner()

        self.assertEqual(RunnerTestCase.TestSuiteA.TestCase1,
                         r.test_cases()[0])
        self.assertEqual(RunnerTestCase.TestSuiteA.TestCase2,
                         r.test_cases()[1])
        self.assertEqual(RunnerTestCase.TestSuiteA.TestCase3,
                         r.test_cases()[2])
        self.assertEqual(RunnerTestCase.TestSuiteB.TestCase1,
                         r.test_cases()[3])
        self.assertEqual(RunnerTestCase.TestSuiteB.TestCase2,
                         r.test_cases()[4])
예제 #54
0
파일: runner.py 프로젝트: farikonsec/veripy
    def test_it_should_step_through_the_test_cases_in_order(self):
        options, args = sampleOptions(
            "--configuration tests/mocks/veripy.cfg host")

        c = MockConfiguration(args, options, MockInterface())
        c.mock_test_plan = [
            RunnerTestCase.TestSuiteA, RunnerTestCase.TestSuiteB
        ]

        r = c.build_runner()
        s = [[None, None],
             [RunnerTestCase.TestSuiteA, RunnerTestCase.TestSuiteA.TestCase1],
             [RunnerTestCase.TestSuiteA, RunnerTestCase.TestSuiteA.TestCase2],
             [RunnerTestCase.TestSuiteA, RunnerTestCase.TestSuiteA.TestCase3],
             [RunnerTestCase.TestSuiteB, RunnerTestCase.TestSuiteB.TestCase1],
             [RunnerTestCase.TestSuiteB, RunnerTestCase.TestSuiteB.TestCase2]]

        for step in s:
            self.assertEqual(step[0], r.current_test_suite())
            self.assertEqual(step[1], r.current_test_case())

            print "+ next_case()"
            r.next_case()
예제 #55
0
    def test_it_should_configure_a_test_case_pattern(self):
        options, args = sampleOptions(["--case", "My Test Case", "host"])

        c = Configuration(args, options)

        self.assertEqual('My Test Case', c.case_rx)
예제 #56
0
    def test_it_should_configure_a_test_case_pattern(self):
        options, args = sampleOptions(["--case", "My Test Case", "host"])

        c = Configuration(args, options)

        self.assertEqual('My Test Case', c.case_rx)
예제 #57
0
    def test_it_should_get_the_link_layer_address_of_tap2(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)

        self.assertEqual('00:50:56:c0:00:08', c.test_network().tp2.ll_addr)
예제 #58
0
    def test_it_should_get_the_physical_device_for_tap2(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)

        self.assertEqual('vmnet8', c.test_network().tp2.dev)
예제 #59
0
    def test_it_should_configure_the_prefix_size_of_link_c(self):
        options, args = sampleOptions("--configuration tests/mocks/veripy.cfg host")

        c = Configuration(args, options)

        self.assertEqual(64, c.test_network().link3.prefix_size)
예제 #60
0
 def test_it_should_build_a_configuration(self):
     options, args = sampleOptions("host")
     
     self.assertTrue(isinstance(Configuration(args, options), Configuration))