# Path: test_projects/django18/likert_test_app/models.py
# class ParametersModel(models.Model):
#     ice_cream_is_yummy = LikertField()
#     # cabbage_is_yummy = LikertField(max_value=4)
#     item = LikertField('ice cream beats cabbage')
#     # seven = LikertField('seven is my lucky number', max_value=7)
#     # ten = LikertField('ten is the best', max_value=10)
# 
#     questions_should_not_be_optional = LikertField(blank=False)


from django.test import TestCase
from django.core.urlresolvers import reverse
from .models import ParametersModel
        self.assertEqual(response.status_code, 200)


class SurveyCreateViewTestCase(TestCase):

    def test_add_view(self):
        response = self.client.get(reverse('likert_add'))
        self.assertEqual(response.status_code, 200)

    def test_creation_full_valid(self):
        post_data = {
            'ice_cream_is_yummy': '5',
            'item': '3',
            'questions_should_not_be_optional': '1'
        }
        response = self.client.post(reverse('likert_add'), post_data)
        self.assertEqual(response.status_code, 302)
        self.assertTrue(response.has_header('location'))
        self.assertEqual(
            response['location'].count(reverse('likert_added')),
            1)

    def test_creation_null(self):
        post_data = {
            'ice_cream_is_yummy': '5',
            'item': '',
            'questions_should_not_be_optional': '5'
        }
        response = self.client.post(reverse('likert_add'), post_data)
        self.assertEqual(response.status_code, 302)

# Path: test_projects/django18/likert_test_app/models.py
# class ParametersModel(models.Model):
#     ice_cream_is_yummy = LikertField()
#     # cabbage_is_yummy = LikertField(max_value=4)
#     item = LikertField('ice cream beats cabbage')
#     # seven = LikertField('seven is my lucky number', max_value=7)
#     # ten = LikertField('ten is the best', max_value=10)
# 
#     questions_should_not_be_optional = LikertField(blank=False)


# Path: test_projects/django18/likert_test_app/tests.py
from django.test import TestCase
from django.core.urlresolvers import reverse
from .models import ParametersModel

        self.assertEqual(response.status_code, 200)


class SurveyCreateViewTestCase(TestCase):

    def test_add_view(self):
        response = self.client.get(reverse('likert_add'))
        self.assertEqual(response.status_code, 200)

    def test_creation_full_valid(self):
        post_data = {
            'ice_cream_is_yummy': '5',
            'item': '3',
            'questions_should_not_be_optional': '1'
        }
        response = self.client.post(reverse('likert_add'), post_data)
        self.assertEqual(response.status_code, 302)
        self.assertTrue(response.has_header('location'))
        self.assertEqual(
            response['location'].count(reverse('likert_added')),
            1)

    def test_creation_null(self):
        post_data = {
            'ice_cream_is_yummy': '5',
            'item': '',
            'questions_should_not_be_optional': '5'
        }
        response = self.client.post(reverse('likert_add'), post_data)
        self.assertEqual(response.status_code, 302)

        surveys = ParametersModel.objects.all()