title: Django: IntegrityError: column user_id is not unique
body: <p>I wanted to test something that uses a User objects. </p>
  
  <p>But for some reason I am getting:</p>
  
  <pre><code>IntegrityError: column user_id is not unique
  </code></pre>
  
  <p>I've been banging my head against the wall for a while now and it seems I can't figure out what is wrong. At first I thought that maybe the database isn't getting flushed in between tests but I traced User.objects.all() and it's an empty list. </p>
  
  <p>This is the test:</p>
  
  <pre><code>from django.contrib.auth.models import User
  from django.test import TestCase
  
  class TestSomething(TestCase):
      def test_create_user(self):
          User.objects.create_user('foo', 'foo@bar', 'bar')
  </code></pre>
  
  <p>My test settings: </p>
  
  <pre><code>from settings import *
  
  DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.sqlite3', 
          'NAME': ':memory:',
      }
  }
  
  TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
  </code></pre>
  
  <p><strong>Update:</strong></p>
  
  <p>I should read my strack traces a little better. It's actually the following signal that is causing the problem.</p>
  
  <pre><code>@receiver(post_save, sender=User)
  def create_profile(sender, instance, created, **kwargs):
      if created:
          Profile(user=instance).save()
  </code></pre>