from this_app import app
from this_app.models import User
import unittest


class BasicTestCase(unittest.TestCase):
    """ Basic flask setup tests """

    def test_index(self):
        """ Initial test to ensure flask was setup correctly """
        tester = app.test_client(self)
        response = tester.get('/', content_type='html/text')
        self.assertEqual(response.status_code, 200)


class UserTestCase(unittest.TestCase):
    """ Test the User class """

    def setUp(self):
        """ Setup a new user """
        self.user = User('leo@email.com', 'leo', 'pwd')

    def test_successful_signup(self):
        """Test new user can sign up successfully"""
        self.user.users = {}
        result = self.user.create_user()
        expected = {1: {'email': 'leo@email.com', 'username': 'leo', 'password': 'pwd'}}
        self.assertEqual(expected, result)

    def test_successful_login(self):
        """Test registered user canlogin successfully"""
        self.user.users = {1: {'email': 'leo@email.com', 'username': 'leo', 'password': 'pwd'}}
@@ -50,16 +50,118 @@
 ort User
+, Bucketlist, BucketlistItem%0Afrom werkzeug.security import generate_password_hash, check_password_hash
 %0Aimport 
@@ -837,16 +837,150 @@
 _user()%0A
+        for k, v in self.user.users.items():%0A            for m in v.values():%0A                stored_password = m%5B'password'%5D%0A        
         
@@ -1051,22 +1051,60 @@
 ssword':
+ check_password_hash(stored_password,
  'pwd'
+)
 %7D%7D%0A     
@@ -1098,32 +1098,40 @@
 pwd')%7D%7D%0A        
+    
+    
 self.assertEqual
@@ -1222,16 +1222,17 @@
 user can
+ 
 login su
@@ -1340,8 +1340,891 @@
  'pwd'%7D%7D
+%0A%0A%0Aclass BucketlistTestCase(unittest.TestCase):%0A    %22%22%22 Test the Bucketlist class %22%22%22%0A%0A    def setUp(self):%0A        %22%22%22 Setup a bucketlist %22%22%22%0A        self.bucketlist = Bucketlist('Hiking', 'Go for hiking')%0A%0A    def test_create_bucketlist_without_user_fails(self):%0A        %22%22%22Test bucketlist creation without a new user fails%22%22%22%0A        User.users = %7B%7D%0A        result = self.bucketlist.create_bucketlist()%0A        result.insert_into_user()%0A        expected = %7B1: %7B1: %7B'name': 'Hiking', 'description': 'Go for hiking'%7D%7D%7D%0A        self.assertNotEqual(expected, result)%0A%0A    def test_successful_bucketlist_creation(self):%0A        %22%22%22Test bucketlist creation is successful%22%22%22%0A        self.bucketlist.bucketlists = %7B%7D%0A        result = self.bucketlist.create_bucketlist()%0A        expected = %7B1: %7B'name': 'Hiking', 'description': 'Go for hiking'%7D%7D%0A        self.assertEqual(expected, result)%0A

Add tests for class bucketlist