Ejemplo n.º 1
0
class PostServiceTest(unittest.TestCase):
    def setUp(self):
        os.environ["DJANGO_SETTINGS_MODULE"] = "settings"
        from models.PostService import PostService

        self.postService = PostService()

    def test_findList(self):
        pl = self.postService.findList(0, limit=1)
        self.assertIsNotNone(pl)
        for p in pl:
            print p

    def test_findContent(self):
        post = self.postService.findContent("bbefab1f")
        self.assertIsNotNone(post)
        print post
Ejemplo n.º 2
0
    def setUp(self):
        os.environ["DJANGO_SETTINGS_MODULE"] = "settings"
        from models.PostService import PostService

        self.postService = PostService()