Esempio n. 1
0
 def setUp(self):
     self.acc1 = User.create_user(email='*****@*****.**',
                                  password='******')
     self.news_object = News(title="test news title",
                             text="test news text",
                             preview_text="test news preview text",
                             author=self.acc1)
     self.news_object.save()
Esempio n. 2
0
 def setUp(self):
     self.acc1 = User.create_user(email='*****@*****.**', password='******')
     self.news_object = News(
         title="test news title",
         text="test news text",
         preview_text="test news preview text",
         author=self.acc1 
     )
     self.news_object.save()
Esempio n. 3
0
class AddTestCase(TestCase):
    def setUp(self):
        self.acc1 = User.create_user(email='*****@*****.**',
                                     password='******')
        self.news_object = News(title="test news title",
                                text="test news text",
                                preview_text="test news preview text",
                                author=self.acc1)
        self.news_object.save()

    def tearDown(self):
        User.objects.delete()
        News.objects.delete()

    def DISABLED_testNoError(self):
        result = send_email_task.delay(self.news_object.id)
        #print "result.status=", result.status
        #print "result.traceback=", result.traceback

        self.assertTrue(result.successful())
Esempio n. 4
0
class AddTestCase(TestCase):
    def setUp(self):
        self.acc1 = User.create_user(email='*****@*****.**', password='******')
        self.news_object = News(
            title="test news title",
            text="test news text",
            preview_text="test news preview text",
            author=self.acc1 
        )
        self.news_object.save()

    def tearDown(self):
        User.objects.delete()
        News.objects.delete()
        
        
    def DISABLED_testNoError(self):
        result = send_email_task.delay(self.news_object.id)
        #print "result.status=", result.status
        #print "result.traceback=", result.traceback
        
        self.assertTrue(result.successful())