Created
July 30, 2015 01:53
-
-
Save alxpck/44a3c3ce700bfacd4d0e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.test import TestCase | |
from django.utils import timezone | |
from .models import Course | |
# Create your tests here. | |
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment