<commit_before>from django.test import TestCase
from django.utils import timezone

# Create your tests here.
from .models import Course

class CourseModelTests(TestCase):
    def test_course_creation(self):
        course = Course.objects.create(
            title="Python Regular Expressions",
            description="Learn to write regular expressions in Python"
        )
        now = timezone.now()
        self.assertLess(course.created_at, now)

class StepModelTests(TestCase):
    def test_course_creation(self):
        course = Course.objects.create(
            title="Step 1",
            description="This is step 1"
        )
        now = timezone.now()
        self.assertLess(course.created_at, now)<commit_msg>Django learning site: complete Step model creation unit test<commit_after>from django.test import TestCase
from django.utils import timezone

# Create your tests here.
from .models import Course, Step

class CourseModelTests(TestCase):
    def test_course_creation(self):
        course = Course.objects.create(
            title="Python Regular Expressions",
            description="Learn to write regular expressions in Python"
        )
        now = timezone.now()
        self.assertLess(course.created_at, now)

class StepModelTests(TestCase):
    def test_step_creation(self):
        course = Course.objects.create(
            title="Python Regular Expressions",
            description="Learn to write regular expressions in Python"
        )

        step = Step.objects.create(
            title="Step 1",
            description="This is step 1",
            course = course
        )
        now = timezone.now()
        self.assertLess(step.course.created_at, now)
{'fraction_non_alphanumeric': 0.08250438853130486, 'fraction_numerical': 0.0023405500292568754, 'mean_word_length': 2.6152219873150107, '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': '243292', 'n_tokens_mistral': 448, 'n_tokens_neox': 428, 'n_words': 126}