from django.test import TestCase

# Create your tests here.

from django.test import TestCase
from django.core.urlresolvers import reverse

from account.factories import AccountFactory, DEFAULT_PASSWORD


class TestNotification(TestCase):
    def setUp(self):
        account = AccountFactory.create()
        self.user = account.user

    def test_access_notification_list(self):
        self.client.login(username=self.user.username, password=DEFAULT_PASSWORD)
        response = self.client.get(reverse('notifications'))
        self.assertEqual(response.status_code, 200)
        self.assertTemplateUsed(response, 'notification/list.html')

Add test to list of notification page.
Add test to list of notification page.

  from django.test import TestCase
+ from django.core.urlresolvers import reverse
  
- # Create your tests here.
+ from account.factories import AccountFactory, DEFAULT_PASSWORD
  
+ 
+ class TestNotification(TestCase):
+     def setUp(self):
+         account = AccountFactory.create()
+         self.user = account.user
+ 
+     def test_access_notification_list(self):
+         self.client.login(username=self.user.username, password=DEFAULT_PASSWORD)
+         response = self.client.get(reverse('notifications'))
+         self.assertEqual(response.status_code, 200)
+         self.assertTemplateUsed(response, 'notification/list.html')
+ 
Add test to list of notification page.
## Code Before:
from django.test import TestCase

# Create your tests here.

## Instruction:
Add test to list of notification page.
## Code After:
from django.test import TestCase
from django.core.urlresolvers import reverse

from account.factories import AccountFactory, DEFAULT_PASSWORD


class TestNotification(TestCase):
    def setUp(self):
        account = AccountFactory.create()
        self.user = account.user

    def test_access_notification_list(self):
        self.client.login(username=self.user.username, password=DEFAULT_PASSWORD)
        response = self.client.get(reverse('notifications'))
        self.assertEqual(response.status_code, 200)
        self.assertTemplateUsed(response, 'notification/list.html')
