Beispiel #1
0
    def test_get_submission_meta_dict(self):
        self._publish_xls_file(self.xls_file_path)
        xform = XForm.objects.get()
        meta = get_submission_meta_dict(xform, None)
        self.assertEqual(len(meta), 2)
        self.assertTrue('instanceID' in meta[0])
        self.assertEqual(meta[1], 0)

        instance_id = 'uuid:9118a3fc-ab99-44cf-9a97-1bb1482d8e2b'
        meta = get_submission_meta_dict(xform, instance_id)
        self.assertTrue('instanceID' in meta[0])
        self.assertEqual(meta[0]['instanceID'], instance_id)
        self.assertEqual(meta[1], 0)
Beispiel #2
0
    def test_get_submission_meta_dict(self):
        self._publish_xls_file(self.xls_file_path)
        xform = XForm.objects.get()
        meta = get_submission_meta_dict(xform, None)
        self.assertEqual(len(meta), 2)
        self.assertTrue('instanceID' in meta[0])
        self.assertEqual(meta[1], 0)

        instance_id = 'uuid:9118a3fc-ab99-44cf-9a97-1bb1482d8e2b'
        meta = get_submission_meta_dict(xform, instance_id)
        self.assertTrue('instanceID' in meta[0])
        self.assertEqual(meta[0]['instanceID'], instance_id)
        self.assertEqual(meta[1], 0)