def test_deity_sects(self): """ """ deity = Deity(self.redis, {'deity_unity_roll': 100, 'deity_importance_roll': 100}) deity.add_sects() self.assertEqual(len(deity.sects), 0) deity = Deity(self.redis, {'deity_unity_roll': 0, 'deity_importance_roll': 100}) deity.add_sects() self.assertGreaterEqual(len(deity.sects), 1) sect=Sect(self.redis) wrongdeity=sect.deity deity = Deity(self.redis, {'sects':[sect]}) self.assertIsNot(deity, wrongdeity) deity.add_sects() self.assertIs(deity, sect.deity) self.assertGreaterEqual(len(deity.sects), 1)
def test_deity_sects(self): """ """ deity = Deity(self.redis, { 'deity_unity_roll': 100, 'deity_importance_roll': 100 }) deity.add_sects() self.assertEqual(len(deity.sects), 0) deity = Deity(self.redis, { 'deity_unity_roll': 0, 'deity_importance_roll': 100 }) deity.add_sects() self.assertGreaterEqual(len(deity.sects), 1) sect = Sect(self.redis) wrongdeity = sect.deity deity = Deity(self.redis, {'sects': [sect]}) self.assertIsNot(deity, wrongdeity) deity.add_sects() self.assertIs(deity, sect.deity) self.assertGreaterEqual(len(deity.sects), 1)
def test_deity_portfolios(self): """ """ deity = Deity(self.redis, {'portfolios': ['tacos', 'burritos']}) deity.add_sects() self.assertIn('tacos', deity.portfolios)
def test_deity_portfolios(self): """ """ deity = Deity(self.redis, {'portfolios':['tacos','burritos']}) deity.add_sects() self.assertIn( 'tacos', deity.portfolios )