예제 #1
0
from datetime import timedelta

from django.conf import settings
from django.core.urlresolvers import reverse
from django.test.client import Client

from HVZ.basetest import BaseTest, define_user
from HVZ.main.models import Player, Game
from HVZ.feed.models import Meal

ROB_ZOMBIE = define_user({
    "first_name": "Rob",
    "last_name": "Zombie",
    "email": "*****@*****.**",
    "password": "******",
    "school": "4",
    "dorm": "208",
    "grad_year": "2013",
    "cell": "1234567890",
    "can_oz": "on",
    "feed": "SNEAX"
})

VICTIM = define_user({
    "first_name": "Hapless",
    "last_name": "Victim",
    "email": "*****@*****.**",
    "password": "******",
    "school": "4",
    "dorm": "208",
    "grad_year": "2015",
    "cell": "1234567890",
예제 #2
0
from django.core import management
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from django.test.client import Client
from django.test.utils import override_settings

from HVZ.basetest import BaseTest, define_user
from HVZ.main import models, forms


HUGH_MANN = define_user({
        "first_name": "Hugh",
        "last_name": "Mann",
        "email": "*****@*****.**",
        "password": "******",
        "school": "4",
        "dorm": "208",
        "grad_year": "2013",
        "cell": "1234567890",
        "feed": "PLANS",
})

class SignupTest(BaseTest):

    def test_tabler_required(self):
        """Ensure the registration page requires a logged-in tabler."""
        c = Client()
        url_register = reverse("register")
        url_login = reverse("login")
        response = c.get(url_register, follow=True)
        self.assertRedirects(response, "{}/?next={}".format(url_login, url_register))
예제 #3
0
from django.conf import settings
from django.core.urlresolvers import reverse
from django.test.client import Client

from HVZ.basetest import BaseTest, define_user
from HVZ.main.models import Player, Game
from HVZ.feed.models import Meal

ROB_ZOMBIE = define_user(
    {
        "first_name": "Rob",
        "last_name": "Zombie",
        "email": "*****@*****.**",
        "password": "******",
        "school": "4",
        "dorm": "208",
        "grad_year": "2013",
        "cell": "1234567890",
        "can_oz": "on",
        "feed": "SNEAX",
    }
)

VICTIM = define_user(
    {
        "first_name": "Hapless",
        "last_name": "Victim",
        "email": "*****@*****.**",
        "password": "******",
        "school": "4",
        "dorm": "208",
예제 #4
0
from datetime import timedelta

from django.core.urlresolvers import reverse
from django.test.client import Client
from django.conf import settings

from HVZ.basetest import BaseTest, define_user
from HVZ.main.models import Player, Game
from HVZ.missions.models import Mission, Plot

HUGH_MANN = define_user({
        "first_name": "Hugh",
        "last_name": "Mann",
        "email": "*****@*****.**",
        "password": "******",
        "school": "4",
        "dorm": "208",
        "grad_year": "2013",
        "cell": "1234567890",
        "feed": "PLANS",
})

ROB_ZOMBIE = define_user({
        "first_name": "Rob",
        "last_name": "Zombie",
        "email": "*****@*****.**",
        "password": "******",
        "school": "4",
        "dorm": "208",
        "grad_year": "2013",
        "cell": "1234567890",