<commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-

from django.test import TestCase
from lxml import etree
from StringIO import StringIO
from django.contrib.auth.models import User
from django.test.client import Client
from pyxform import xls2json_backends
from dkobo.koboform.models import SurveyDraft, SurveyPreview
from dkobo.koboform import pyxform_utils
import json
import utils


text = """"survey",,,,,
                ,"name","type","label","hint","required"
                ,"gps","geopoint","Record your current location",,"false"
                ,"start","start",,,
                ,"end","end",,,
                "settings",
                ,"form_title"
                ,"New survey" """

class CreateSurveyFromCsvTextTests(TestCase):
    def test_parses_survey_passed_in_as_csv_and_returns_xml_representation(self):<commit_msg>fixing import within test<commit_after>#!/usr/bin/python
# -*- coding: utf-8 -*-

from django.test import TestCase
from lxml import etree
from StringIO import StringIO
from django.contrib.auth.models import User
from django.test.client import Client
from pyxform import xls2json_backends
from dkobo.koboform.models import SurveyDraft, SurveyPreview
from dkobo.koboform import pyxform_utils
from dkobo.koboform import utils
import json


text = """"survey",,,,,
                ,"name","type","label","hint","required"
                ,"gps","geopoint","Record your current location",,"false"
                ,"start","start",,,
                ,"end","end",,,
                "settings",
                ,"form_title"
                ,"New survey" """

class CreateSurveyFromCsvTextTests(TestCase):
    def test_parses_survey_passed_in_as_csv_and_returns_xml_representation(self):
{'fraction_non_alphanumeric': 0.11863425925925926, 'fraction_numerical': 0.0023148148148148147, 'mean_word_length': 3.2903225806451615, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1423964', 'n_tokens_mistral': 509, 'n_tokens_neox': 492, 'n_words': 118}