Mercurial > hg
comparison tests/test-bugzilla.t @ 33432:fbfecd1dbfb5
configitems: register the 'bugzilla.mocklog' config
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 07 Jul 2017 10:04:03 +0200 |
parents | 22c53b3a390d |
children | 4441705b7111 |
comparison
equal
deleted
inserted
replaced
33431:fd6eb444f2e1 | 33432:fbfecd1dbfb5 |
---|---|
1 mock bugzilla driver for testing template output: | 1 mock bugzilla driver for testing template output: |
2 | 2 |
3 $ cat <<EOF > bzmock.py | 3 $ cat <<EOF > bzmock.py |
4 > from __future__ import absolute_import | 4 > from __future__ import absolute_import |
5 > from mercurial import extensions | 5 > from mercurial import extensions |
6 > from mercurial import registrar | |
6 > | 7 > |
8 > configtable = {} | |
9 > configitem = registrar.configitem(configtable) | |
10 > | |
11 > configitem('bugzilla', 'mocklog', | |
12 > default=None, | |
13 > ) | |
7 > def extsetup(ui): | 14 > def extsetup(ui): |
8 > bugzilla = extensions.find('bugzilla') | 15 > bugzilla = extensions.find('bugzilla') |
9 > class bzmock(bugzilla.bzaccess): | 16 > class bzmock(bugzilla.bzaccess): |
10 > def __init__(self, ui): | 17 > def __init__(self, ui): |
11 > super(bzmock, self).__init__(ui) | 18 > super(bzmock, self).__init__(ui) |