def test_get_of_new_object_should_raise_exception(self):

        profile = UserProfile(description='Profile for new user',
                              url='http://www.yahoo.com',
                              user=User.objects.get(username='user1'))

        profile.save()

        self.assertRaises(ObjectDoesNotExist, UserProfile.objects.get,
                          pk=profile.pk)
Test that a view can't be accidentally instantiated before deployment
dataset/ETHPy150Open dominno/django-moderation/tests/tests/unit/testregister.py/RegistrationTestCase.test_get_of_new_object_should_raise_exception--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/tests/regressiontests/generic_views/base.py/ViewTest.test_no_init_kwargs