<commit_before>from django.test import TestCase

from retail.sale.models import Sale
from retail.sale.utils import ImportDSR, ImportDSRLine, dsr_sample, dsr_sale

class SaleTestCase(TestCase):

    def test_bulk_dsr(self):
        """
        Make sure bulk imports of DSR files work
        """
        ImportDSR( dsr_sample, "X1" )
        self.assertTrue(len(Sale.objects.all())>0)
        
    def test_single_dsr(self):
        """
        Make sure bulk imports of DSR files work
        """
        sale = ImportDSRLine(dsr_sale)
        self.assertTrue(len(Sale.objects.all())>0)

    def test_curl(self):
        """
        curl -X POST http://127.0.0.1/api/sale/sale/create_from_dsr/ -u <uname>:<pw> -H "Content-Type: text/plain" --data "@<filename>"
        """
        self.assertTrue(True)
        <commit_msg>Removed tests for utils<commit_after>from django.test import TestCase

{'fraction_non_alphanumeric': 0.11968680089485459, 'fraction_numerical': 0.010067114093959731, 'mean_word_length': 2.5943775100401605, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '4898931', 'n_tokens_mistral': 299, 'n_tokens_neox': 290, 'n_words': 65}