def setUp(self): try: populate() except ImportError: print('The module populate_script does not exist') except NameError: print('The function populate() does not exist or is not correct') except Exception as e: print('Something went wrong in the populate() function :-(')
def setUp(self): try: populate() except ImportError: print('The module populate_script does not exist') except NameError: print('The function populate() does not exist or is not correct') print('Something went wrong in the populate() function') # login is required self.client.login(username='******', password='******')
def populate(request): k, flag = populate_script.populate() return HttpResponse("Populating " + str(k) + " Done exceptions " + str(flag))