Example #1
0
 def setUp(self):
     MainTestCase.setUp(self)
     self._create_user_and_login()
     self._publish_transportation_form()
     s = 'transport_2011-07-25_19-05-49'
     self._make_submission(
         os.path.join(self.this_directory, 'fixtures', 'transportation',
                      'instances', s, s + '.xml'))
     self.submission = self.xform.surveys.reverse()[0]
     self.url = reverse(map_view,
                        kwargs={
                            'username': self.user.username,
                            'id_string': self.xform.id_string
                        })
     self.perm_url = reverse(set_perm,
                             kwargs={
                                 'username': self.user.username,
                                 'id_string': self.xform.id_string
                             })
     self.edit_url = reverse(edit,
                             kwargs={
                                 'username': self.user.username,
                                 'id_string': self.xform.id_string
                             })
     self.show_url = reverse(show, kwargs={'uuid': self.xform.uuid})
     self.show_normal_url = reverse(show,
                                    kwargs={
                                        'username': self.user.username,
                                        'id_string': self.xform.id_string
                                    })
     self.api_url = reverse(api,
                            kwargs={
                                'username': self.user.username,
                                'id_string': self.xform.id_string
                            })
Example #2
0
 def setUp(self):
     MainTestCase.setUp(self)
     self._create_user_and_login()
     self._publish_transportation_form_and_submit_instance()
     self.public_api_url = reverse(
         public_api, kwargs={"username": self.user.username, "id_string": self.xform.id_string}
     )
 def setUp(self):
     MainTestCase.setUp(self)
     self._create_user_and_login()
     self._publish_transportation_form()
     s = 'transport_2011-07-25_19-05-49'
     self._make_submission(os.path.join(self.this_directory, 'fixtures',
         'transportation', 'instances', s, s + '.xml'))
     self.submission = self.xform.surveys.reverse()[0]
     self.url = reverse(map_view, kwargs={'username': self.user.username,
         'id_string': self.xform.id_string})
     self.perm_url = reverse(set_perm, kwargs={
         'username': self.user.username, 'id_string': self.xform.id_string})
     self.edit_url = reverse(edit, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string
     })
     self.show_url = reverse(show,
                 kwargs={'uuid': self.xform.uuid})
     self.show_normal_url = reverse(show, kwargs={
             'username': self.user.username,
             'id_string': self.xform.id_string
     })
     self.api_url = reverse(api, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string
     })
Example #4
0
 def setUp(self):
     MainTestCase.setUp(self)
     self._create_user_and_login()
     self._publish_transportation_form()
     self.url = reverse(show, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string
     })
Example #5
0
 def setUp(self):
     MainTestCase.setUp(self)
     self._create_user_and_login()
     self._publish_transportation_form_and_submit_instance()
     self.api_url = reverse(api, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string
     })
Example #6
0
 def setUp(self):
     MainTestCase.setUp(self)
     self._create_user_and_login()
     self._publish_transportation_form_and_submit_instance()
     self.url = reverse(show, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string
     })
Example #7
0
 def setUp(self):
     MainTestCase.setUp(self)
     self.set_role_url = reverse(set_role)
     self._create_user_and_login()
     self._publish_transportation_form()
     self.form_show_url = reverse(show, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string
     })
     UserProfile.objects.get_or_create(user=self.user)
Example #8
0
 def setUp(self):
     MainTestCase.setUp(self)
     self.set_role_url = reverse(set_role)
     self._create_user_and_login()
     self._publish_transportation_form()
     self.form_show_url = reverse(show,
                                  kwargs={
                                      'username': self.user.username,
                                      'id_string': self.xform.id_string
                                  })
     UserProfile.objects.get_or_create(user=self.user)
 def setUp(self):
     MainTestCase.setUp(self)
     self._create_user_and_login()
     self._publish_transportation_form_and_submit_instance()
     self.submission = self.xform.surveys.reverse()[0]
     self.url = reverse(show_submission, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string,
         'uuid': self.submission.uuid,
     })
     self.survey_url = reverse(survey_responses, kwargs={
                               'instance_id': self.submission.pk})
Example #10
0
 def setUp(self):
     MainTestCase.setUp(self)
     self._create_user_and_login()
     self._publish_transportation_form_and_submit_instance()
     self.perm_url = reverse(set_perm, kwargs={
         'username': self.user.username, 'id_string': self.xform.id_string})
     self.show_url = reverse(show,
                 kwargs={'uuid': self.xform.uuid})
     self.url = reverse(enter_data, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string
     })
 def setUp(self):
     MainTestCase.setUp(self)
     self._create_user_and_login()
     self._publish_transportation_form_and_submit_instance()
     self.delete_url = reverse(delete_data, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string
     })
     self.mongo_args = {
         'username': self.user.username, 'id_string': self.xform.id_string,
         'query': "{}", 'limit': 1,
         'sort': '{"_id":-1}', 'fields': '["_id","_uuid"]'}
Example #12
0
 def setUp(self):
     MainTestCase.setUp(self)
     #Already done by setUp
     #self._create_user_and_login()
     self._publish_transportation_form_and_submit_instance()
     self.perm_url = reverse(set_perm, kwargs={
         'username': self.user.username, 'id_string': self.xform.id_string})
     self.show_url = reverse(show, kwargs={'uuid': self.xform.uuid})
     self.url = reverse(enter_data, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string
     })
 def setUp(self):
     MainTestCase.setUp(self)
     self._create_user_and_login()
     self._publish_transportation_form_and_submit_instance()
     self.submission = self.xform.surveys.reverse()[0]
     self.url = reverse(show_submission, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string,
         'uuid': self.submission.uuid,
     })
     self.survey_url = reverse(survey_responses, kwargs={
             'instance_id': self.submission.pk })
Example #14
0
    def setUp(self):
        MainTestCase.setUp(self)
        self._create_user_and_login()
        self._publish_transportation_form()

        # turn on crowd forms for this form
        self.xform.is_crowd_form = True
        self.xform.save()
        self.edit_url = reverse(edit, kwargs={
            'username': self.xform.user.username,
            'id_string': self.xform.id_string
        })
        self.alice = 'alice'
        self.crowdform_count = 0
Example #15
0
    def setUp(self):
        MainTestCase.setUp(self)
        self._create_user_and_login()
        self._publish_transportation_form()

        # turn on crowd forms for this form
        self.xform.is_crowd_form = True
        self.xform.save()
        self.edit_url = reverse(edit,
                                kwargs={
                                    'username': self.xform.user.username,
                                    'id_string': self.xform.id_string
                                })
        self.alice = 'alice'
        self.crowdform_count = 0
Example #16
0
 def setUp(self):
     MainTestCase.setUp(self)
     self._create_user_and_login()
     self._publish_transportation_form()
     s = "transport_2011-07-25_19-05-49"
     self._make_submission(
         os.path.join(self.this_directory, "fixtures", "transportation", "instances", s, s + ".xml")
     )
     self.submission = self.xform.surveys.reverse()[0]
     self.url = reverse(map_view, kwargs={"username": self.user.username, "id_string": self.xform.id_string})
     self.perm_url = reverse(set_perm, kwargs={"username": self.user.username, "id_string": self.xform.id_string})
     self.edit_url = reverse(edit, kwargs={"username": self.user.username, "id_string": self.xform.id_string})
     self.show_url = reverse(show, kwargs={"uuid": self.xform.uuid})
     self.show_normal_url = reverse(show, kwargs={"username": self.user.username, "id_string": self.xform.id_string})
     self.api_url = reverse(api, kwargs={"username": self.user.username, "id_string": self.xform.id_string})
Example #17
0
 def setUp(self):
     MainTestCase.setUp(self)
     self._create_user_and_login()
     self._publish_transportation_form_and_submit_instance()
     self.delete_url = reverse(delete_data,
                               kwargs={
                                   'username': self.user.username,
                                   'id_string': self.xform.id_string
                               })
     self.mongo_args = {
         'username': self.user.username,
         'id_string': self.xform.id_string,
         'query': "{}",
         'limit': 1,
         'sort': '{"_id":-1}',
         'fields': '["_id","_uuid"]'
     }
Example #18
0
 def setUp(self):
     MainTestCase.setUp(self)
     self._create_user_and_login('bob', 'bob')
     self._publish_transportation_form()
     self.url = reverse(formList, kwargs={'username': self.user.username})
Example #19
0
 def setUp(self):
     MainTestCase.setUp(self)
     self._create_user_and_login('bob', 'bob')
     self._publish_transportation_form()
     self.url = reverse(formList, kwargs={'username': self.user.username})
Example #20
0
 def setUp(self):
     MainTestCase.setUp(self)
     self._create_user_and_login()
     self._publish_transportation_form()
     self.url = reverse(clone_xlsform, kwargs={'username': self.user.username})
Example #21
0
 def setUp(self):
     MainTestCase.setUp(self)
     self._create_user_and_login()
     self._publish_transportation_form()
     self.url = reverse(clone_xlsform, kwargs={"username": self.user.username})
Example #22
0
 def setUp(self):
     MainTestCase.setUp(self)
     self.settings_url = reverse(
         profile_settings, kwargs={'username': self.user.username})