示例#1
0
文件: tests.py 项目: kfarr2/mlp
def create_users(self):
    """
    Create users
    """
    u = User(first_name="user", last_name="jones", email="*****@*****.**")
    u.set_password("foobar")
    u.save()
    self.user = u

    a = User(first_name="admin", last_name="jones", email="*****@*****.**", is_staff=True)
    a.set_password("foobar")
    a.save()
    self.admin = a
示例#2
0
文件: tests.py 项目: PSU-OIT-ARC/mlp
def create_users(self):
    """
    Create mock up users
    """
    u = User(first_name="bob", last_name="foo", email="*****@*****.**")
    u.set_password('foobar')
    u.save()
    self.user = u

    a = User(first_name="alice", last_name="foo", email="*****@*****.**", is_staff=True)
    a.set_password('foobar')
    a.save()
    self.admin = a
示例#3
0
文件: tests.py 项目: PSU-OIT-ARC/mlp
def create_users(self):
    """
    Create some users
    """
    a = User(first_name="Admin", last_name="Joe", email="*****@*****.**", is_staff=True)
    a.set_password("foobar")
    a.save()
    self.admin = a

    u = User(first_name="User", last_name="Mike", email="*****@*****.**")
    u.set_password("foobar")
    u.save()
    self.user = u
示例#4
0
def create_users(self):
    """
    Create mock up users
    """
    u = User(first_name="bob", last_name="foo", email="*****@*****.**")
    u.set_password('foobar')
    u.save()
    self.user = u

    a = User(first_name="alice",
             last_name="foo",
             email="*****@*****.**",
             is_staff=True)
    a.set_password('foobar')
    a.save()
    self.admin = a