'Test that ugettext_lazy objects work when saving model instances
through various methods. Refs #10498.'

def test_create_relation_with_ugettext_lazy(self):

    notlazy = u'test'
    lazy = ugettext_lazy(notlazy)
    reporter = Article.objects.create(headline=lazy, pub_date=datetime.now())
    article = Article.objects.get()
    self.assertEqual(article.headline, notlazy)
    article.headline = lazy
    article.save()
    self.assertEqual(article.headline, notlazy)
    Article.objects.update(headline=lazy)
    article = Article.objects.get()
    self.assertEqual(article.headline, notlazy)
    Article.objects.all().delete()
    Article.objects.bulk_create([Article(headline=lazy, pub_date=datetime.now())])
    article = Article.objects.get()
    self.assertEqual(article.headline, notlazy)
