<filename>django_ToDoApp_sroy8091/todolist/tests.py
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.test import TestCase

# Create your tests here.

import unittest
from django.test import Client


class SimpleTest(unittest.TestCase):
    def setUp(self):
        # Every test needs a client.
        self.client = Client()

    def test_server(self):
        # Issue a GET request.
        response = self.client.get('/')

        # Check that the response is 200 OK.
        self.assertEqual(response.status_code, 200)

    def test_categories(self):
        response = self.client.get('/')
        self.assertGreater(response.context.get("categories").count(), 0)

<filename>django_ToDoApp_sroy8091/todolist/tests.py
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.test import TestCase

# Create your tests here.

import unittest
from django.test import Client


class SimpleTest(unittest.TestCase):
    def setUp(self):
        # Every test needs a client.
        self.client = Client()

    def test_server(self):
        # Issue a GET request.
        response = self.client.get('/')

        # Check that the response is 200 OK.
        self.assertEqual(response.status_code, 200)

    def test_categories(self):
        response = self.client.get('/')
        self.assertGreater(response.context.get("categories").count(), 0)

# -*- coding: utf-8 -*- # Create your tests here. # Every test needs a client. # Issue a GET request. # Check that the response is 200 OK.