Esempio n. 1
0
	def setup_class(cls):
		# Okay create a new game then
		print 'Class name!', cls.__name__

		g = Game()
		g.ruleset  = ruleset
		g.shortname= cls.__name__
		g.longname = cls.__name__
		g.admin    = 'admin@localhost'
		g.comment  = 'A test game'
		g.turn     = 0
		g.commandline="Unknown!"
		g.save()

		g.ruleset.initialise()
Esempio n. 2
0
	def test_initialise(self):
		"""
		Tests that we can initialise a new game using the ruleset.
		"""
		# Okay create a new game then
		g = Game()
		g.ruleset  = ruleset
		g.shortname= self.__class__.__name__
		g.longname = gamename
		g.admin    = 'admin@localhost'
		g.comment  = 'A test game'
		g.turn     = 0
		g.commandline="Unknown!"
		g.save()

		g.ruleset.initialise()