import unittest
import urllib
from flask_testing import LiveServerTestCase
from flask_testing import TestCase
from flask import Flask
from Designs.main import *



class Myshop(TestCase):
    '''class defining tests for the myshop application'''
    render_templates = False
    def create_app(self):
        app==Flask(__name__)
        app.config['TESTING'] = True
        app.config['LIVESERVER_PORT'] = 8943
        #set to zero to allow OS to choose which port to use
        app.config['LIVESERVER_TIMEOUT'] = 10
        return app
    def test_assert_not_process_the_template(self):
        response = self.client.get("templates/")

        assert "" != response.data

    def test_assert_mytemplate_used(self):
        response = self.client.get("templates/")

        self.assert_template_used('add_shopping_list_item.html')

    
if __name__=='__main__':
    unittest.main()

@@ -154,16 +154,40 @@
 mport *%0A
+from redundant import *%0A
 %0A%0A%0Aclass
@@ -428,12 +428,9 @@
 %5D = 
-8943
+0
 %0A   
@@ -552,16 +552,61 @@
 urn app%0A
+    def setup(self):%0A        self.entries=3%0A%0A
     def 
@@ -734,17 +734,16 @@
 se.data%0A
-%0A
     def 
@@ -751,152 +751,1223 @@
 est_
-assert_mytemplate_used(self):%0A        response = self.client.get(%22templates/%22)%0A%0A        self.assert_template_used('add_shopping_list_item.html')
+redundant_register_returns_list_object(self):%0A        '''test that when user enters their registration details, %0A        they are stored in a list object'''%0A        a='anderson'%0A        b='kenyanya'%0A        c='andersonkenyanya'%0A        self.assertIsInstance(register(a,b,c),list,msg='method register has not returned list object')%0A%0A    def test_redundant_returns_correct_num_of_entrie(self):%0A        '''method to ensure variables are not added to list automagically'''%0A        temp_length=register('a','b','c')%0A        self.assertEqual(len(temp_length),6,msg='All three fields in register need to be filled out')%0A%0A    def test_data_integrity(self):%0A        '''ensure one does not enter digits as names of people during registration'''%0A        name=900%0A        email=89.0%0A        password='password'%0A        self.assertRaises(TypeError,'Name can not be a digit combination')%0A%0A    def test_register_appends_items(self):%0A        '''test if the register function appends entered details into a list'''%0A        temp_list=register('a','b','c')%0A        self.assertIn('a',temp_list)%0A%0A    #def test_create_return_list_of_lists(self):%0A        #'''Ensure that creating a room returns a list containing other lists'''%0A%0A%0A%0A%0A%0A    
 %0A%0A  

Add tests