Example #1
0
File: tests.py Project: 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
Example #2
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
Example #3
0
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
Example #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