from django.test import TestCase


class AccountsViewsTestCase(TestCase):
    fixtures = ['users_views_testdata.yaml']

    def test_index(self):
        resp = self.client.get('/')
        self.assertEqual(resp.status_code, 200)
        self.assertTrue('users' in resp.context)
        self.assertEqual([user.pk for user in resp.context['users']], [1, 2, 3])

    def test_details(self):
        resp = self.client.get('/view/1/')
        self.assertEqual(resp.status_code, 200)
        self.assertTrue('user' in resp.context)
        self.assertEqual(resp.context['user'].pk, 1)

    def test_edit(self):
        resp = self.client.get('/edit/1/')
        self.assertEqual(resp.status_code, 200)
        self.assertTrue('user' in resp.context)
        self.assertEqual(resp.context['user'].pk, 1)

@@ -772,28 +772,392 @@
 resp.context%5B'user'%5D.pk, 1)%0A
+%0A    def test_add(self):%0A        resp = self.client.get('/add/')%0A        self.assertEqual(resp.status_code, 200)%0A%0A    def test_delete_non_existent_user(self):%0A        resp = self.client.get('/del/99/', follow=True)%0A        self.assertEqual(resp.status_code, 200)%0A        self.assertTrue('alert' in resp.context)%0A        self.assertIsNotNone(resp.context%5B'alert'%5D)%0A

add tests