Example #1
0
 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 :-(')
Example #2
0
   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='******')
Example #3
0
def populate(request):
    k, flag = populate_script.populate()
    return HttpResponse("Populating " + str(k) + " Done exceptions " +
                        str(flag))