mirror of
				https://github.com/django/django.git
				synced 2025-11-04 05:35:37 +00:00 
			
		
		
		
	This commit revertsf44c4a5d0fand39bbd165. django.test.simple will be updated in a separate commit as it requires invasive changes.
		
			
				
	
	
		
			15 lines
		
	
	
	
		
			377 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
	
		
			377 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from django.test import TestCase
 | 
						|
 | 
						|
from .models import Empty
 | 
						|
 | 
						|
 | 
						|
class EmptyModelTests(TestCase):
 | 
						|
    def test_empty(self):
 | 
						|
        m = Empty()
 | 
						|
        self.assertEqual(m.id, None)
 | 
						|
        m.save()
 | 
						|
        Empty.objects.create()
 | 
						|
        self.assertEqual(len(Empty.objects.all()), 2)
 | 
						|
        self.assertTrue(m.id is not None)
 | 
						|
        existing = Empty(m.id)
 | 
						|
        existing.save()
 |