Exemplo n.º 1
0
 def test_not_di(self):
     '''Test trade code not Di'''
     uwp = Uwp('X766000-0')
     for pop in '123456789ABCDEF':
         for gov in '123456789ABCDEF':
             for law in '123456789ABCDEFGHJ':
                 uwp.population = pop
                 uwp.government = gov
                 uwp.law_level = law
                 tcs = TradeCodes(uwp)
                 self.assertFalse('Di' in tcs.trade_codes)
Exemplo n.º 2
0
 def test_not_px(self):
     '''Test trade code not Px'''
     uwp = Uwp('C700055-5')
     for atm in '01456789C':
         for hyd in '6789A':
             for pop in '012789ABCDEF':
                 for law in '012345ABCDEF':
                     uwp.atmosphere = atm
                     uwp.hydrographics = hyd
                     uwp.population = pop
                     uwp.law_level = law
                     tcs = TradeCodes(uwp)
                     self.assertFalse('Px' in tcs.trade_codes)
Exemplo n.º 3
0
 def test_px(self):
     '''Test trade code Px'''
     uwp = Uwp('C700055-5')
     for atm in '23AB':
         for hyd in '12345':
             for pop in '3456':
                 for law in '6789':
                     # Also need to check MW
                     uwp.atmosphere = atm
                     uwp.hydrographics = hyd
                     uwp.population = pop
                     uwp.law_level = law
                     tcs = TradeCodes(uwp)
                     self.assertTrue('Px' in tcs.trade_codes)
Exemplo n.º 4
0
 def test_not_ba(self):
     '''Test trade code not Ba'''
     uwp = Uwp('X755000-0')
     for pop in '123456789A':
         for gov in '123456789AB':
             for law in '123456789A':  # Assume the rest are OK
                 for tech in '123456':  # Assume the rest are OK
                     for starport in 'ABCD':
                         uwp.starport = starport
                         uwp.population = pop
                         uwp.government = gov
                         uwp.law_level = law
                         uwp.tech_level = tech
                         tcs = TradeCodes(uwp)
                         self.assertFalse('Ba' in tcs.trade_codes)