Beispiel #1
0
    def test_aug_base_1(self):
        cpython = ietf_aug_base_1.Cpython()
        cpython.doc.ydktest_aug_1.aug_one = 'aug one'
        cpython.doc.ydktest_aug_2.aug_two = 'aug two'
        cpython.doc.ydktest_aug_4.aug_four = 'aug four'
        cpython.lib.ydktest_aug_1.ydktest_aug_nested_1.aug_one = 'aug one'
        cpython.lib.ydktest_aug_2.ydktest_aug_nested_2.aug_two = 'aug two'
        cpython.lib.ydktest_aug_4.ydktest_aug_nested_4.aug_four = 'aug four'
        cpython.doc.disutils.four_aug_list.enabled = True

        item1 = cpython.doc.disutils.four_aug_list.Ldata()
        item2 = cpython.doc.disutils.four_aug_list.Ldata()

        item1.name, item1.number = 'one', 1
        item2.name, item1.number = 'two', 2

        self.crud.create(self.ncc, cpython)
        cpython_read = self.crud.read(self.ncc, ietf_aug_base_1.Cpython())

        self.assertEqual(cpython.doc.ydktest_aug_1.aug_one,
                         cpython_read.doc.ydktest_aug_1.aug_one)
        self.assertEqual(cpython.doc.ydktest_aug_2.aug_two,
                         cpython_read.doc.ydktest_aug_2.aug_two)
        self.assertEqual(cpython.doc.ydktest_aug_4.aug_four,
                         cpython_read.doc.ydktest_aug_4.aug_four)
        self.assertEqual(
            cpython.lib.ydktest_aug_1.ydktest_aug_nested_1.aug_one,
            cpython_read.lib.ydktest_aug_1.ydktest_aug_nested_1.aug_one)
        self.assertEqual(
            cpython.lib.ydktest_aug_2.ydktest_aug_nested_2.aug_two,
            cpython_read.lib.ydktest_aug_2.ydktest_aug_nested_2.aug_two)
        self.assertEqual(
            cpython.lib.ydktest_aug_4.ydktest_aug_nested_4.aug_four,
            cpython_read.lib.ydktest_aug_4.ydktest_aug_nested_4.aug_four)
Beispiel #2
0
    def test_on_demand_downloading(self):
        # create augmentation configuration
        cpython = ietf_aug_base_1.Cpython()
        cpython.doc.ydktest_aug_1.aug_one = 'aug one'
        cpython.doc.ydktest_aug_2.aug_two = 'aug two'
        cpython.doc.ydktest_aug_4.aug_four = 'aug four'
        cpython.lib.ydktest_aug_1.ydktest_aug_nested_1.aug_one = 'aug one'
        cpython.lib.ydktest_aug_2.ydktest_aug_nested_2.aug_two = 'aug two'
        cpython.lib.ydktest_aug_4.ydktest_aug_nested_4.aug_four = 'aug four'
        cpython.doc.disutils.four_aug_list.enabled = True

        item1 = cpython.doc.disutils.four_aug_list.Ldata()
        item2 = cpython.doc.disutils.four_aug_list.Ldata()

        item1.name, item1.number = 'one', 1
        item2.name, item1.number = 'two', 2

        self.crud.create(self.ncc, cpython)

        self.crud.read(self.ncc_empty_repo, ietf_aug_base_1.Cpython())
Beispiel #3
0
 def tearDown(self):
     self.crud.delete(self.ncc, ietf_aug_base_1.Cpython())
     self.crud.delete(self.ncc, ietf_aug_base_2.Cpython())
Beispiel #4
0
 def setUp(self):
     self.crud.delete(self.ncc, ietf_aug_base_1.Cpython())
     self.crud.delete(self.ncc, ietf_aug_base_2.Cpython())