def setUp(self): self.user = User.objects.create(username='******') self.user.save() self.chall_user = self.user.get_profile().get_extension(ChallengeUser) self.user2 = User.objects.create(username='******') self.user2.save() self.chall_user2 = self.user2.get_profile().get_extension(ChallengeUser) scoring.setup()
def setUp(self): self.user = User.objects.create(username='******') self.user.set_password('_test_pw') self.user.save() profile = self.user.get_profile() self.qotd_user = profile.get_extension(QotdUser) scoring.setup() self.client.login(username='******', password='******')
def setUp(self): self.user, new = User.objects.get_or_create(username='******') self.user.save() profile = self.user.get_profile() self.quest_user = profile.get_extension(QuestUser) scoring.setup()
import sys sys.path.append('..');sys.path.append('.') from django.core.management import setup_environ import settings setup_environ(settings) from wouso.core import scoring from wouso.core.scoring.models import * if __name__ == '__main__': print 'Setting up the Scoring module...', # TODO: i'm pretty sure this can be accomplished by simple fixtures. scoring.setup() print 'done!' # Dump print "Coins: " for c in Coin.objects.all(): print " ", c print "Formulas: " for f in Formula.objects.all(): print " ", f
def setUp(self): self.user, new = User.objects.get_or_create(username='******') self.user.save() profile = self.user.get_profile() self.qotd_user = profile.get_extension(QotdUser) scoring.setup()
import sys sys.path.append('..') sys.path.append('.') from django.core.management import setup_environ import settings setup_environ(settings) from wouso.core import scoring from wouso.core.scoring.models import * if __name__ == '__main__': print 'Setting up the Scoring module...', # TODO: i'm pretty sure this can be accomplished by simple fixtures. scoring.setup() print 'done!' # Dump print "Coins: " for c in Coin.objects.all(): print " ", c print "Formulas: " for f in Formula.objects.all(): print " ", f