Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Minimal django TestCase
from django.test import TestCase
from .models import Thing
# Create your tests here.
class TestModels(TestCase):
def test_saving_a_model(self):
thing = Thing.objects.create()
self.assertEqual(Thing.objects.all().count(), 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.