<commit_before>from datetime import date, timedelta
from django.contrib.auth.models import User
from django.test.client import Client
from django.core.urlresolvers import reverse
from ._utils import load_audio_pub, TestCase


class AudioViewTestCase(TestCase):

    def setUp(self):
        self.c = Client()

    def test_audio_detail(self):
        audio_pub = load_audio_pub('test.mp3')
        response = self.c.get(audio_pub.get_absolute_url())
        self.assertEqual(response.context['audio_pub'], audio_pub)
        self.assertContains("stuff that it should contain")

    #def test_audio_type_unsupported(self):
    #    '''if the player cant play the file, it should render as
    #    a download link'''
    #    audio_pub = load_audio_pub('test.flac')
    #    response = self.c.get(audio_pub.get_absolute_url())
    #    self.assertContains(response, "href=\"%s\"" % audio_pub.file.url())

    def test_audio_list(self):
        audio_pub = load_audio_pub('test.ogg')
        audio_pub2 = load_audio_pub('test.mp3')
        response = self.c.get(reverse('audio_pub_list'))

        self.assertEqual(list(response.context['audio_pub_list']),
                list(AudioPublications.objects.all()))<commit_msg>updated the tests and added some place holders<commit_after>from datetime import date, timedelta
from django.contrib.auth.models import User
from django.test.client import Client
from django.core.urlresolvers import reverse
from ._utils import load_audio_pub, TestCase
from ._utils import load_audio_pub, TestCase


class AudioViewTestCase(TestCase):

    def setUp(self):
        self.c = Client()

    def test_audio_detail(self):
        audio_pub = load_audio_pub('test.mp3')
        response = self.c.get(reverse('audio_detail') + '/' + audio_pub.title)
        self.assertEqual(response.context['audio_pub'], audio_pub)
        self.assertContains("stuff that it should contain")

    def test_audio_upload(self):
        pass 
    
    def test_admin_widget(self):
        pass
 
    def test_audio_list(self):
        audio_pub = load_audio_pub('test.ogg')
        audio_pub2 = load_audio_pub('test.mp3')
        response = self.c.get(reverse('audio_list'))
        self.assertEqual(list(response.context['audio_list']),
                list(AudioPublications.objects.all()))
{'fraction_non_alphanumeric': 0.109375, 'fraction_numerical': 0.0026041666666666665, 'mean_word_length': 3.5374015748031495, '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': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3292729', 'n_tokens_mistral': 700, 'n_tokens_neox': 679, 'n_words': 143}