Exemplo n.º 1
0
 def setUp(self):
     super(TestCase, self).setUp()
     self.db = StrictRedis(db=15)
     self.db.flushdb()
     self.app = WallApp(config={'db': 15})
     self.app.add_post_type(TestPost)
     self.user = self.app.login('Ivanova', 'test')
     self.app.user = self.user
Exemplo n.º 2
0
class TestCase(AsyncTestCase):
    """
    Subclass API: Base for Wall unit tests. Takes care of setting / cleaning up
    the test environment and provides utilities for testing.

    Attributes:

     * `db`: connection to temporary Redis database (`15`)
     * `app`: Wall application. `TestPost` is available as registered post type.
     * `user`: active user.
    """

    def setUp(self):
        super(TestCase, self).setUp()
        self.db = StrictRedis(db=15)
        self.db.flushdb()
        self.app = WallApp(config={'db': 15})
        self.app.add_post_type(TestPost)
        self.user = self.app.login('Ivanova', 'test')
        self.app.user = self.user

    def get_new_ioloop(self):
        return IOLoop.instance()
Exemplo n.º 3
0
Arquivo: test.py Projeto: krmnn/wall
class TestCase(AsyncTestCase):
    """
    Extension API: Base for Wall unit tests. Takes care of setting / cleaning up
    the test environment and provides utilities for testing.

    Attributes:

     * `db`: connection to temporary Redis database (`15`)
     * `app`: Wall application. `TestPost` is available as registered post type.
    """

    @classmethod
    def setUpClass(cls):
        getLogger('wall').setLevel(CRITICAL)

    def setUp(self):
        super(TestCase, self).setUp()
        self.db = StrictRedis(db=15)
        self.db.flushdb()
        self.app = WallApp(config={'db': 15})
        self.app.add_post_type(TestPost)

    def get_new_ioloop(self):
        return IOLoop.instance()
Exemplo n.º 4
0
Arquivo: test.py Projeto: krmnn/wall
 def setUp(self):
     super(TestCase, self).setUp()
     self.db = StrictRedis(db=15)
     self.db.flushdb()
     self.app = WallApp(config={'db': 15})
     self.app.add_post_type(TestPost)