示例#1
0
 def test_group_diff_identical(self):
     expected_results = sorted(([
         'RESERVED', 'INTERNAL', 'RESERVED -> RFC1918', 'ANY',
         'INTERNAL -> RFC1918'
     ], [], []))
     options = Namespace()
     options.gmp = ['172.16.0.1', '192.168.0.1']
     results = sorted(cgrep.group_diff(options, self.db))
     self.assertEquals(sorted(results[2]), sorted(expected_results[2]))
示例#2
0
 def test_group_diff(self):
     expected_results = sorted(
         (['ANY'],
          ['GOOGLE_DNS -> GOOGLE_PUBLIC_DNS_ANYCAST',
           'GOOGLE_DNS'], ['RESERVED -> LOOPBACK', 'RESERVED']))
     options = Namespace()
     options.gmp = ['8.8.8.8', '127.0.0.1']
     results = sorted(cgrep.group_diff(options, self.db))
     self.assertEquals(sorted(results[2]), sorted(expected_results[2]))
示例#3
0
 def test_group_diff(self):
   expected_results = sorted((
       ['ANY'],
       ['GOOGLE_DNS -> GOOGLE_PUBLIC_DNS_ANYCAST', 'GOOGLE_DNS'],
       ['RESERVED -> LOOPBACK', 'RESERVED']
   ))
   options = Namespace()
   options.gmp = ['8.8.8.8', '127.0.0.1']
   results = sorted(cgrep.group_diff(options, self.db))
   self.assertEquals(sorted(results[2]), sorted(expected_results[2]))
示例#4
0
 def test_group_diff_identical(self):
   expected_results = sorted((
       ['RESERVED', 'INTERNAL', 'RESERVED -> RFC1918',
        'ANY', 'INTERNAL -> RFC1918'],
       [],
       []
   ))
   options = Namespace()
   options.gmp = ['172.16.0.1', '192.168.0.1']
   results = sorted(cgrep.group_diff(options, self.db))
   self.assertEquals(sorted(results[2]), sorted(expected_results[2]))