Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (9 sloc) 263 Bytes
from mock_django.models import ModelMock
from unittest2 import TestCase
class Model(object):
id = '1'
pk = '2'
class ModelMockTestCase(TestCase):
def test_pk_alias(self):
mock = ModelMock(Model)
self.assertEquals(mock.id, mock.pk)
Something went wrong with that request. Please try again.