File: base.py

package info (click to toggle)
pyramid-jinja2 2.7%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 2,776 kB
  • ctags: 688
  • sloc: python: 1,657; makefile: 72; sh: 7
file content (20 lines) | stat: -rw-r--r-- 534 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from pyramid import testing


class Base(object):
    def setUp(self):
        self.request = testing.DummyRequest()
        self.config = testing.setUp(request=self.request)
        self.request.registry = self.config.registry
        import os
        here = os.path.abspath(os.path.dirname(__file__))
        self.templates_dir = os.path.join(here, 'templates')

    def tearDown(self):
        testing.tearDown()
        del self.config


class Mock(object):
    def __init__(self, **kwargs):
        self.__dict__.update(kwargs)