main/tests/test_process.py
def _publish_file(self, xls_path, strict=True):
        """
        Returns False if not strict and publish fails
        """
        pre_count = XForm.objects.count()
        self.response = MainTestCase._publish_xls_file(self, xls_path)
        # make sure publishing the survey worked
        self.assertEqual(self.response.status_code, 200)
        if XForm.objects.count() != pre_count + 1:
            # print file location
            print '\nPublish Failure for file: %s' % xls_path
            if strict:
                self.assertEqual(XForm.objects.count(), pre_count + 1)
            else:
                return False
        self.xform = list(XForm.objects.all())[-1]
        return True

        Returns False if not strict and publish fails
        
Returns False if not strict and publish fails
Returns False if not strict and publish fails
def _publish_file(self, xls_path, strict=True):
        pre_count = XForm.objects.count()
        self.response = MainTestCase._publish_xls_file(self, xls_path)
        self.assertEqual(self.response.status_code, 200)
        if XForm.objects.count() != pre_count + 1:
            print '\nPublish Failure for file: %s' % xls_path
            if strict:
                self.assertEqual(XForm.objects.count(), pre_count + 1)
            else:
                return False
        self.xform = list(XForm.objects.all())[-1]
        return True
def _publish_file ( self , xls_path , strict = True ) : pre_count = XForm . objects . count ( ) self . response = MainTestCase . _publish_xls_file ( self , xls_path ) self . assertEqual ( self . response . status_code , 200 ) if XForm . objects . count ( ) != pre_count + 1 : print '\nPublish Failure for file: %s' % xls_path if strict : self . assertEqual ( XForm . objects . count ( ) , pre_count + 1 ) else : return False self . xform = list ( XForm . objects . all ( ) ) [ - 1 ] return True
Returns False if not strict and publish fails
Returns False if not strict and publish fails
"""
        Returns False if not strict and publish fails
        """ # make sure publishing the survey worked # print file location
self
xls_path
strict