Mercurial > sypikslang
diff gamelib/tests/test_lab.py @ 49:373c57ab4140
Product -> Schematic.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Mon, 07 May 2012 21:24:23 +0200 |
parents | efc4f90cfd63 |
children | ef63532cac13 |
line wrap: on
line diff
--- a/gamelib/tests/test_lab.py Mon May 07 21:23:54 2012 +0200 +++ b/gamelib/tests/test_lab.py Mon May 07 21:24:23 2012 +0200 @@ -1,7 +1,7 @@ from unittest import TestCase from gamelib.lab import Lab -from gamelib import research, products +from gamelib import research, schematics LAB_DATA = { @@ -25,11 +25,11 @@ all_sciences.add(type(science)) self.assertTrue(len(all_sciences) > 3) - def test_find_new_products(self): + def test_find_new_schematics(self): lab = Lab(LAB_DATA) - new_products = lab.find_new_products() - self.assertTrue(products.TeslaTank in new_products) - self.assertTrue(products.DoomsdayVirus not in new_products) + new_schematics = lab.find_new_schematics() + self.assertTrue(schematics.TeslaTank in new_schematics) + self.assertTrue(schematics.DoomsdayVirus not in new_schematics) def test_find_new_research(self): lab = Lab(LAB_DATA) @@ -41,8 +41,8 @@ # Check that we save what we loaded. lab = Lab(LAB_DATA) self.assertEqual(LAB_DATA, lab.save_data()) - # Add a product and check that it gets saved as well. - lab._gain_science(products.LightningGun()) + # Add a schematic and check that it gets saved as well. + lab._gain_science(schematics.LightningGun()) new_science = dict( - LAB_DATA['science'].items() + [('product.LightningGun', 0)]) + LAB_DATA['science'].items() + [('schematic.LightningGun', 0)]) self.assertEqual({'science': new_science}, lab.save_data())