Skip to content

Instantly share code, notes, and snippets.

@moacirmoda
Created August 10, 2018 00:54
Show Gist options
  • Save moacirmoda/d260850e28a65ff570c30bc5e5bd8aeb to your computer and use it in GitHub Desktop.
Save moacirmoda/d260850e28a65ff570c30bc5e5bd8aeb to your computer and use it in GitHub Desktop.
from django.test import TestCase
from myapp.models import Person
class PersonTestCase(TestCase):
def test_should_return_attributes(self):
self.assertTrue(hasattr(Person, 'first_name'))
self.assertTrue(hasattr(Person, 'last_name'))
self.assertTrue(hasattr(Person, 'age'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment