Beispiel #1
0
def generatenpc():
    """Generate an NPC"""

    features = feature_filter('npc')
    features['deity'] = Deity(app.server)
    tempobj = NPC(app.server, features)
    return render_template('npc.html', tempobj=tempobj)
    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)
Beispiel #3
0
def generatedeity():
    """Generate a deity"""

    features = feature_filter('deity')
    deity = Deity(app.server, features)
    return render_template('deity.html', tempobj=deity)
Beispiel #4
0
    def test_static_sect(self):
        """  """
	deity=Deity(self.redis)
        sect = Sect(self.redis, {'deity':deity})
        self.assertNotEqual(sect.domain, '')
        self.assertIn(sect.domain, deity.portfolios)
Beispiel #5
0
    def test_deity_portfolios(self):
        """  """

        deity = Deity(self.redis, {'portfolios': ['tacos', 'burritos']})
        deity.add_sects()
        self.assertIn('tacos', deity.portfolios)
Beispiel #6
0
    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)
Beispiel #7
0
 def test_deity(self):
     """  """
     deity = Deity(self.redis)
     self.assertNotEqual('', deity.name)
    def test_deity_portfolios(self):
        """  """

        deity = Deity(self.redis, {'portfolios':['tacos','burritos']})
        deity.add_sects()
        self.assertIn( 'tacos', deity.portfolios )