import json
from .tests import BaseTest


class BucketlistTestCase(BaseTest):

    def Setup(self):
        pass

    def test_create_bucketlist(self):
        """ test create new bucketlist """
        pass

    def test_unathorized_bucketlist_creation(self):
        """ test creating a bucketlist without being logged in """
        pass

    def test_create_invalid_bucketlist(self):
        """ test creating bucketlist with empty data """
        pass

    def test_get_bucketlists(self):
        """ test get all bucketlists of a user """
        pass

    def test_get_bucketlist(self):
        """ test get specific bucketlist """
        pass

    def test_update_bucketlist(self):
        """: test edit and update a specific bucketlist """
        pass

    def test_delete_bucketlists(self):
        """ test deletion of a specific bucketlist """
        pass

@@ -200,145 +200,1480 @@
     
-pass%0A%0A    def test_unathorized_bucketlist_creation(self):%0A        %22%22%22 test creating a bucketlist without being logged in %22%22%22%0A        pass
+user = %7B'username': 'default_user', 'password': 'password'%7D%0A        response = self.client.post('/auth/login', data=user)%0A        self.assertEqual(response.status_code, 200)%0A%0A        # extract auth_token%0A        user_auth = json.loads(response.data)%0A        auth_token = user_auth%5B'auth_token'%5D%0A        headers = %7B'auth_token': auth_token%7D%0A        form = %7B'name': 'Trip to paris'%7D%0A        url = '/bucketlists/'%0A%0A        # create bucket list%0A        response = self.client.post(url, data=form, headers=headers)%0A        self.assertEqual(response.status_code, 201)%0A        self.assertIn('Successfully created bucketlist', response.data.decode())%0A%0A    def test_unathorized_bucketlist_creation(self):%0A        %22%22%22 test creating a bucketlist without being logged in %22%22%22%0A        form = %7B'name': 'bucketlist while not loggedin'%7D%0A        url = '/bucketlists/'%0A%0A        response = self.client.post(url, data=form)%0A        self.assertEqual(response.status_code, 401)%0A        self.assertIn('Forbidden Access', response.data.decode())%0A%0A    def test_create_bucketlist_invalid_token(self):%0A        %22%22%22 test create a bucketlist with an invalid token %22%22%22%0A        form = %7B'name': 'Bucketlist invalid token'%7D%0A        headers = %7B'auth_token': ''%7D%0A        url = '/bucketlists/'%0A%0A        # create bucket list%0A        response = self.client.post(url, data=form, headers=headers)%0A        self.assertEqual(response.status_code, 401)%0A        self.assertIn('Forbidden Access', response.data.decode())
 %0A%0A  

add test cases for creating a bucketlist