예제 #1
0
 def setUp(self):
     self.database = FakeCouchDb()
     self.case_orig_db = CommCareCase.get_db()
     self.form_orig_db = XFormInstance.get_db()
     self.user_orig_db = CommCareUser.get_db()
     CommCareCase.set_db(self.database)
     XFormInstance.set_db(self.database)
     CommCareUser.set_db(self.database)
예제 #2
0
 def setUp(self):
     self.database = FakeCouchDb()
     self.case_orig_db = CommCareCase.get_db()
     self.form_orig_db = XFormInstance.get_db()
     self.user_orig_db = CommCareUser.get_db()
     CommCareCase.set_db(self.database)
     XFormInstance.set_db(self.database)
     CommCareUser.set_db(self.database)
예제 #3
0
 def setUp(self):
     self.database = FakeCouchDb()
     self.user_orig_db = CommCareUser.get_db()
     CommCareUser.set_db(self.database)
     self.factory = RequestFactory()
     domain = Domain.get_or_create_with_name(DOMAIN)
     domain.is_active = True
     domain.save()
     self.domain = domain
     user = WebUser.get_by_username('test')
     if not user:
         user = WebUser.create(domain.name, 'test', 'passwordtest', None,
                               None)
     user.is_authenticated = True
     user.is_superuser = True
     user.is_authenticated = True
     user.is_active = True
     self.user = user
예제 #4
0
 def setUp(self):
     self.database = FakeCouchDb()
     self.case_orig_db = CommCareCase.get_db()
     self.form_orig_db = XFormInstance.get_db()
     self.user_orig_db = CommCareUser.get_db()
     CommCareCase.set_db(self.database)
     XFormInstance.set_db(self.database)
     CommCareUser.set_db(self.database)
     self.factory = RequestFactory()
     domain = Domain.get_or_create_with_name('up-nrhm')
     domain.is_active = True
     domain.save()
     self.domain = domain
     user = WebUser.get_by_username('test')
     if not user:
         user = WebUser.create(domain.name, 'test', 'passwordtest')
     user.is_authenticated = True
     user.is_superuser = True
     user.is_authenticated = True
     user.is_active = True
     self.user = user
예제 #5
0
 def setUp(self):
     self.database = FakeCouchDb()
     self.case_orig_db = CommCareCase.get_db()
     self.form_orig_db = XFormInstance.get_db()
     self.user_orig_db = CommCareUser.get_db()
     CommCareCase.set_db(self.database)
     XFormInstance.set_db(self.database)
     CommCareUser.set_db(self.database)
     self.factory = RequestFactory()
     domain = Domain.get_or_create_with_name('up-nrhm')
     domain.is_active = True
     domain.save()
     self.domain = domain
     user = WebUser.get_by_username('test')
     if not user:
         user = WebUser.create(domain.name, 'test', 'passwordtest')
     user.is_authenticated = True
     user.is_superuser = True
     user.is_authenticated = True
     user.is_active = True
     self.user = user
예제 #6
0
 def tearDown(self):
     CommCareCase.set_db(self.case_orig_db)
     XFormInstance.set_db(self.form_orig_db)
     CommCareUser.set_db(self.user_orig_db)
예제 #7
0
 def tearDown(self):
     CommCareCase.set_db(self.case_orig_db)
     XFormInstance.set_db(self.form_orig_db)
     CommCareUser.set_db(self.user_orig_db)
예제 #8
0
 def tearDown(self):
     CommCareUser.set_db(self.user_orig_db)