コード例 #1
0
ファイル: test_ace.py プロジェクト: dirkakrid/nettool
 def test_ineqaulity(self):
     ace = Ace()
     ace.network = NetworkLayer.from_string('1.2.3.0/24 2.3.4.0/24')
     ace.transport = TransportLayerBuilder.build('tcp 1024 65535 22 22')
     ace.logging = LoggingFacility.from_string('warning')
     assert_not_equals(Ace(), ace)
     assert_not_equals(Ace(permit=False), Ace())
     assert_not_equals(Ace(logging=1), Ace())
     ace = Ace()
     ace.network = NetworkLayer.from_string('1.2.3.0/24 2.3.4.0/24')
     assert_not_equals(ace, Ace())
     ace = Ace()
     ace.transport = TransportLayerBuilder.build('tcp 1024 65535 22 22')
     assert_not_equals(ace, Ace())
コード例 #2
0
 def test_ineqaulity(self):
     ace = Ace()
     ace.network = NetworkLayer.from_string('1.2.3.0/24 2.3.4.0/24')
     ace.transport = TransportLayerBuilder.build('tcp 1024 65535 22 22')
     ace.logging = LoggingFacility.from_string('warning')
     assert_not_equals(Ace(), ace)
     assert_not_equals(Ace(permit=False), Ace())
     assert_not_equals(Ace(logging=1), Ace())
     ace = Ace()
     ace.network = NetworkLayer.from_string('1.2.3.0/24 2.3.4.0/24')
     assert_not_equals(ace, Ace())
     ace = Ace()
     ace.transport = TransportLayerBuilder.build('tcp 1024 65535 22 22')
     assert_not_equals(ace, Ace())
コード例 #3
0
ファイル: test_ace.py プロジェクト: dirkakrid/nettool
 def test_eqaulity(self):
     aces = list()
     for index in range(2):
         ace = Ace()
         ace.network = NetworkLayer.from_string('1.2.3.0/24 2.3.4.0/24')
         ace.transport = TransportLayerBuilder.build('tcp 1024 65535 22 22')
         ace.logging = LoggingFacility.from_string('warning')
         aces.append(ace)
     assert_equals(aces[0], aces[1])
コード例 #4
0
 def test_eqaulity(self):
     aces = list()
     for index in range(2):
         ace = Ace()
         ace.network = NetworkLayer.from_string('1.2.3.0/24 2.3.4.0/24')
         ace.transport = TransportLayerBuilder.build('tcp 1024 65535 22 22')
         ace.logging = LoggingFacility.from_string('warning')
         aces.append(ace)
     assert_equals(aces[0], aces[1])
コード例 #5
0
ファイル: test_ace.py プロジェクト: dirkakrid/nettool
 def test_str_unnamed_groups_full_transport(self):
     ace = Ace(network='1.2.3.4 5.6.7.8')
     ace.transport = 'tcp 1-21 22-22'
     expected = 'permit tcp 1.2.3.4/32 1-21 5.6.7.8/32 22'
     assert_equals(ace.__str__(), expected)
コード例 #6
0
 def test_str_unnamed_groups_full_transport(self):
     ace = Ace(network='1.2.3.4 5.6.7.8')
     ace.transport = 'tcp 1-21 22-22'
     expected = 'permit tcp 1.2.3.4/32 1-21 5.6.7.8/32 22'
     assert_equals(ace.__str__(), expected)