<s> from neutron . agent . l3 import fip_rule_priority_allocator as frpa <EOL> from neutron . tests import base <EOL> class TestFipPriority ( base . BaseTestCase ) : <EOL> def setUp ( self ) : <EOL> super ( TestFipPriority , self ) . setUp ( ) <EOL> def test__init__ ( self ) : <EOL> test_pr = frpa . FipPriority ( <NUM_LIT:10> ) <EOL> self . assertEqual ( <NUM_LIT:10> , test_pr . index ) <EOL> def test__repr__ ( self ) : <EOL> test_pr = frpa . FipPriority ( <NUM_LIT:20> ) <EOL> self . assertEqual ( "<STR_LIT>" , str ( test_pr ) ) <EOL> def test__eq__ ( self ) : <EOL> left_pr = frpa . FipPriority ( <NUM_LIT:10> ) <EOL> right_pr = frpa . FipPriority ( <NUM_LIT:10> ) <EOL> other_pr = frpa . FipPriority ( <NUM_LIT:20> ) <EOL> self . assertEqual ( left_pr , right_pr ) <EOL> self . assertNotEqual ( left_pr , other_pr ) <EOL> self . assertNotEqual ( right_pr , other_pr ) <EOL> def test__hash__ ( self ) : <EOL> left_pr = frpa . FipPriority ( <NUM_LIT:10> ) <EOL> right_pr = frpa . FipPriority ( <NUM_LIT:10> ) <EOL> other_pr = frpa . FipPriority ( <NUM_LIT:20> ) <EOL> self . assertEqual ( hash ( left_pr ) , hash ( right_pr ) ) <EOL> self . assertNotEqual ( hash ( left_pr ) , hash ( other_pr ) ) <EOL> self . assertNotEqual ( hash ( other_pr ) , hash ( right_pr ) ) <EOL> class TestFipRulePriorityAllocator ( base . BaseTestCase ) : <EOL> def setUp ( self ) : <EOL> super ( TestFipRulePriorityAllocator , self ) . setUp ( ) <EOL> self . priority_rule_start = <NUM_LIT:100> <EOL> self . priority_rule_end = <NUM_LIT:200> <EOL> self . data_store_path = '<STR_LIT>' <EOL> def test__init__ ( self ) : <EOL> _frpa = frpa . FipRulePriorityAllocator ( self . data_store_path , <EOL> self . priority_rule_start , <EOL> self . priority_rule_end ) <EOL> self . assertEqual ( self . data_store_path , _frpa . state_file ) <EOL> self . assertEqual ( frpa . FipPriority , _frpa . ItemClass ) <EOL> self . assertEqual ( <NUM_LIT:100> , len ( _frpa . pool ) ) </s>
