1
# Use a mako template with some sample data.
6
import openerprunbot.templates
8
if __name__ == "__main__":
9
class RunBotBranch(object):
10
""" Dummy Branch class to test mako templates. """
11
project_name = 'server'
12
unique_name = '~openerp-dev/openobject-server/trunk-dummy'
14
local_revision_count = 333
15
overriden_repo_path = None
16
overriden_project_name = None
19
""" Dummy Point class to test mako templates. """
21
test_base_result = True
22
test_all_result = True
24
subdomain = 'trunk_dummy_2'
26
need_run_reason = ['server']
27
manual_build = sys.maxint
29
repo_updates = [RunBotBranch()]
32
class RunBotGroupedBranchBase(object):
33
""" Dummy Group class to test mako templates. """
35
team_name = 'openerp-dev'
36
manual_build = sys.maxint
37
wrong_matching = False
38
points = [None, None, Point()]
40
def repo_updates(selef):
41
return [RunBotBranch()]
44
""" Dummy RunBot class to test mako templates. """
45
domain = 'runbotdev.openerp.com'
49
manual_build_count = 888
50
server_net_port = 12000
51
server_xml_port = 12100
52
def nginx_index_time(self, t):
54
def available_workers(self):
56
def nginx_groups_sticky(self, team_name):
57
return [RunBotGroupedBranchBase()]
58
def nginx_groups_others(self, team_name):
60
def nginx_groups_registered(self, team_name):
62
def teams_with_branches(self):
63
return ['openerp-dev']
65
response = openerprunbot.templates.render_template('notice.html.mako',
66
r=RunBot(), t=time.time(), re=re, team_name='openerp-dev', sys=sys, message="Hello")