def test_ni(self): '''Test trade code Ni''' uwp = Uwp('D644000-0') for pop in '456': uwp.population = pop tcs = TradeCodes(uwp) self.assertTrue('Ni' in tcs.trade_codes)
def test_not_hi(self): '''Test trade code not Hi''' uwp = Uwp('C755055-5') for pop in '012345678': uwp.population = pop tcs = TradeCodes(uwp) self.assertFalse('Hi' in tcs.trade_codes)
def test_not_lo(self): '''Test trade code not Lo''' uwp = Uwp('C755055-5') for pop in '0456789ABCDEF': uwp.population = pop tcs = TradeCodes(uwp) self.assertFalse('Lo' in tcs.trade_codes)
def test_not_ph(self): '''Test trade code not Ph''' uwp = Uwp('C755055-5') for pop in '012345679ABCDEF': uwp.population = pop tcs = TradeCodes(uwp) self.assertFalse('Ph' in tcs.trade_codes)
def test_hi(self): '''Test trade code Hi''' uwp = Uwp('D755099-9') for pop in '9ABCDEF': uwp.population = pop tcs = TradeCodes(uwp) self.assertTrue('Hi' in tcs.trade_codes)
def test_lo(self): '''Test trade code Lo''' uwp = Uwp('D644000-0') for pop in '123': uwp.population = pop tcs = TradeCodes(uwp) self.assertTrue('Lo' in tcs.trade_codes)
def test_in(self): '''Test trade code In''' uwp = Uwp('C700055-5') for atm in '012479': for pop in '9ABCDEF': uwp.atmosphere = atm uwp.population = pop tcs = TradeCodes(uwp) self.assertTrue('In' in tcs.trade_codes)
def test_pi(self): '''Test trade code Pi''' uwp = Uwp('C700055-5') for atm in '012479': for pop in '78': uwp.atmosphere = atm uwp.population = pop tcs = TradeCodes(uwp) self.assertTrue('Pi' in tcs.trade_codes)
def test_not_in(self): '''Test trade code not In''' uwp = Uwp('C700055-5') for atm in '3568ABC': for pop in '012345678': uwp.atmosphere = atm uwp.population = pop tcs = TradeCodes(uwp) self.assertFalse('In' in tcs.trade_codes)
def test_not_pa(self): '''Test trade code not Pa''' uwp = Uwp('C755000-0') for atm in '0123ABC': for hyd in '01239A': for pop in '01235679ABCDEF': uwp.atmosphere = atm uwp.hydrographics = hyd uwp.population = pop tcs = TradeCodes(uwp) self.assertFalse('Pa' in tcs.trade_codes)
def test_ri(self): '''Test trade code Ri''' uwp = Uwp('C700055-5') for atm in '68': for pop in '678': for gov in '456789': uwp.atmosphere = atm uwp.population = pop uwp.government = gov tcs = TradeCodes(uwp) self.assertTrue('Ri' in tcs.trade_codes)
def test_ag(self): '''Test trade code Ag''' uwp = Uwp('C700055-5') for atm in '456789': for hyd in '45678': for pop in '567': uwp.atmosphere = atm uwp.hydrographics = hyd uwp.population = pop tcs = TradeCodes(uwp) self.assertTrue('Ag' in tcs.trade_codes)
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)
def test_not_na(self): '''Test trade code not Na''' uwp = Uwp('C700055-5') for atm in '456789ABC': for hyd in '456789A': for pop in '012345': uwp.atmosphere = atm uwp.hydrographics = hyd uwp.population = pop tcs = TradeCodes(uwp) self.assertFalse('Na' in tcs.trade_codes)
def test_not_ri(self): '''Test trade code not Ri''' uwp = Uwp('C700055-5') for atm in '01234579ABC': for pop in '0123459ABCDEF': for gov in '012ABCDEF': uwp.atmosphere = atm uwp.population = pop uwp.government = gov tcs = TradeCodes(uwp) self.assertFalse('Ri' in tcs.trade_codes)
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)
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)
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)