class AccountTestCase(TestCase): def setUp(self): self.account = Account() def test_model(self): self.account.username = '******' self.account.email = '*****@*****.**' self.account.set_password('bigboss') self.account.save() def test_authenticate(self): auth = authenticate(email=self.account.email, password='******')
def handle(self, **options): call_command('migrate', verbosity=0, interactive=False) call_command('loaddata', 'application', 'providersocial', 'articleconfiguration', verbosity=0, interactive=False) call_command('compilemessages', verbosity=0, interactive=False) name = str(raw_input(_('Name of project: '))) site = str(raw_input(_('Site of project: '))) email = str(raw_input(_('E-Mail: '))) username = str(raw_input(_('Username: '))) password = getpass.getpass() try: account = Account() account.username = username account.email = email account.set_password(password) account.save() project = Project() project.name = name project.site = site project.save() project_account = ProjectAccount(project=project, account=account) project_account.save() except Exception, e: raise e
def setUp(self): self.account = Account()