annotate MoinMoin/_tests/wikiconfig.py @ 4781:cee722c2097c

Groups2009: wikiconfig_groups.py is used for the groups-related configuration instead of altering wikiconfig.py in _tests.
author Dmitrijs Milajevs <dimazest@gmail.com>
date Wed, 03 Jun 2009 12:10:14 +0200
parents fb0cce9e8621
children f0c2ab8ef256
rev   line source
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1 # -*- coding: iso-8859-1 -*-
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
2 """
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
3 MoinMoin - test wiki configuration
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
4
4027
0d6724b87856 Refactored TestConfig creation for py.test based unit tests.
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3873
diff changeset
5 Do not change any values without good reason.
0d6724b87856 Refactored TestConfig creation for py.test based unit tests.
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3873
diff changeset
6
0d6724b87856 Refactored TestConfig creation for py.test based unit tests.
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3873
diff changeset
7 We mostly want to have default values here, except for stuff that doesn't
0d6724b87856 Refactored TestConfig creation for py.test based unit tests.
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3873
diff changeset
8 work without setting them (like data_dir and underlay_dir).
0d6724b87856 Refactored TestConfig creation for py.test based unit tests.
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3873
diff changeset
9
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
10 @copyright: 2000-2004 by Juergen Hermann <jh@web.de>
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
11 @license: GNU GPL, see COPYING for details.
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
12 """
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
13
2006
1339d6fdc4ff Changed tests to use py.test. Also changed the semantics a bit - the test wiki directory is only created freshly if it does not exist.
Alexander Schremmer <alex AT alexanderweb DOT de>
parents: 1603
diff changeset
14 import os
1339d6fdc4ff Changed tests to use py.test. Also changed the semantics a bit - the test wiki directory is only created freshly if it does not exist.
Alexander Schremmer <alex AT alexanderweb DOT de>
parents: 1603
diff changeset
15
1065
cd5c2aed0c31 fix tests
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 578
diff changeset
16 from MoinMoin.config.multiconfig import DefaultConfig
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
17
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
18
4781
cee722c2097c Groups2009: wikiconfig_groups.py is used for the groups-related configuration instead of altering wikiconfig.py in _tests.
Dmitrijs Milajevs <dimazest@gmail.com>
parents: 4774
diff changeset
19 class LocalConfig(DefaultConfig):
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
20 sitename = u'Developer Test Wiki'
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
21 logo_string = sitename
2006
1339d6fdc4ff Changed tests to use py.test. Also changed the semantics a bit - the test wiki directory is only created freshly if it does not exist.
Alexander Schremmer <alex AT alexanderweb DOT de>
parents: 1603
diff changeset
22
4027
0d6724b87856 Refactored TestConfig creation for py.test based unit tests.
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3873
diff changeset
23 _base_dir = os.path.join(os.path.dirname(__file__), '../../tests/wiki')
2006
1339d6fdc4ff Changed tests to use py.test. Also changed the semantics a bit - the test wiki directory is only created freshly if it does not exist.
Alexander Schremmer <alex AT alexanderweb DOT de>
parents: 1603
diff changeset
24 data_dir = os.path.join(_base_dir, "data")
1339d6fdc4ff Changed tests to use py.test. Also changed the semantics a bit - the test wiki directory is only created freshly if it does not exist.
Alexander Schremmer <alex AT alexanderweb DOT de>
parents: 1603
diff changeset
25 data_underlay_dir = os.path.join(_base_dir, "underlay")
1339d6fdc4ff Changed tests to use py.test. Also changed the semantics a bit - the test wiki directory is only created freshly if it does not exist.
Alexander Schremmer <alex AT alexanderweb DOT de>
parents: 1603
diff changeset
26
4027
0d6724b87856 Refactored TestConfig creation for py.test based unit tests.
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3873
diff changeset
27 #show_hosts = 1
3873
e5a9570d3001 secrets configuration refactored - see the snippet for an example usage
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2286
diff changeset
28
4027
0d6724b87856 Refactored TestConfig creation for py.test based unit tests.
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 3873
diff changeset
29 #secrets = 'some not secret string just to make tests happy'
3873
e5a9570d3001 secrets configuration refactored - see the snippet for an example usage
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2286
diff changeset
30
2286
01f05e74aa9c Big PEP8 and whitespace cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2006
diff changeset
31 # used to check if it is really a wiki we may modify
81
dcbfffac3f9c Added class variable to the test wiki config in order to be able to distinguish it.
Alexander Schremmer <alex@alexanderweb.de.tla>
parents: 0
diff changeset
32 is_test_wiki = True
4781
cee722c2097c Groups2009: wikiconfig_groups.py is used for the groups-related configuration instead of altering wikiconfig.py in _tests.
Dmitrijs Milajevs <dimazest@gmail.com>
parents: 4774
diff changeset
33
cee722c2097c Groups2009: wikiconfig_groups.py is used for the groups-related configuration instead of altering wikiconfig.py in _tests.
Dmitrijs Milajevs <dimazest@gmail.com>
parents: 4774
diff changeset
34 try:
cee722c2097c Groups2009: wikiconfig_groups.py is used for the groups-related configuration instead of altering wikiconfig.py in _tests.
Dmitrijs Milajevs <dimazest@gmail.com>
parents: 4774
diff changeset
35 from wikiconfig_groups import Config
cee722c2097c Groups2009: wikiconfig_groups.py is used for the groups-related configuration instead of altering wikiconfig.py in _tests.
Dmitrijs Milajevs <dimazest@gmail.com>
parents: 4774
diff changeset
36 except ImportError, err:
cee722c2097c Groups2009: wikiconfig_groups.py is used for the groups-related configuration instead of altering wikiconfig.py in _tests.
Dmitrijs Milajevs <dimazest@gmail.com>
parents: 4774
diff changeset
37 if not str(err).endswith('wikiconfig_groups'):
cee722c2097c Groups2009: wikiconfig_groups.py is used for the groups-related configuration instead of altering wikiconfig.py in _tests.
Dmitrijs Milajevs <dimazest@gmail.com>
parents: 4774
diff changeset
38 raise
cee722c2097c Groups2009: wikiconfig_groups.py is used for the groups-related configuration instead of altering wikiconfig.py in _tests.
Dmitrijs Milajevs <dimazest@gmail.com>
parents: 4774
diff changeset
39 Config = LocalConfig
cee722c2097c Groups2009: wikiconfig_groups.py is used for the groups-related configuration instead of altering wikiconfig.py in _tests.
Dmitrijs Milajevs <dimazest@gmail.com>
parents: 4774
diff changeset
40