<commit_before>from django.test import TestCase

from core import utils

class SlugifyOC(TestCase):
    
    def test_oc_slugify(self):
        
        lst = (
            ('test.this.value', 'test-this-value'),
            ('Plone.OpenComparison', 'plone-opencomparison'),
            ('Run from here', 'run-from-here'),
            ('Jump_the shark', 'jump_the-shark'),                                
            )
            
        for l in lst:
            self.assertEquals(utils.oc_slugify(l[0]), l[1])
            
    def test_oc_slugify_fail(self):
        # TODO - fill this in
        pass<commit_msg>maximum test coverage<commit_after>from django.test import TestCase

from core import utils

class SlugifyOC(TestCase):
    
    def test_oc_slugify(self):
        
        lst = (
            ('test.this.value', 'test-this-value'),
            ('Plone.OpenComparison', 'plone-opencomparison'),
            ('Run from here', 'run-from-here'),
            ('Jump_the shark', 'jump_the-shark'),                                
            )
            
        for l in lst:
            self.assertEquals(utils.oc_slugify(l[0]), l[1])
            
class GetPypiUrl(TestCase):
    
    def test_get_pypi_url_success(self):
        
        lst = (
            ('Django', 'http://pypi.python.org/pypi/Django'),
            ('django', 'http://pypi.python.org/pypi/Django'),        
            ('Django Uni Form', 'http://pypi.python.org/pypi/django-uni-form'),
        )
        for l in lst:
            self.assertEquals(utils.get_pypi_url(l[0]), l[1])

    def test_get_pypi_url_fail(self):
        
        lst = (
            'ColdFusion is not here',
            'php is not here'
        )
        for l in lst:
            self.assertEquals(utils.get_pypi_url(l[0]), None)
        
{'fraction_non_alphanumeric': 0.12534664448141986, 'fraction_numerical': 0.003882418191902385, 'mean_word_length': 1.5771428571428572, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '2858929', 'n_tokens_mistral': 573, 'n_tokens_neox': 554, 'n_words': 104}