Skip to content

Instantly share code, notes, and snippets.

@walterrenner
Created August 26, 2015 19:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save walterrenner/90852eec845019da0feb to your computer and use it in GitHub Desktop.
Save walterrenner/90852eec845019da0feb to your computer and use it in GitHub Desktop.
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()
thing.save()
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