Changeset 1612 for trunk/pylucid/tests/__init__.py
- Timestamp:
- 05/31/08 22:01:20 (22 months ago)
- Files:
-
- 1 modified
-
trunk/pylucid/tests/__init__.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pylucid/tests/__init__.py
r1609 r1612 111 111 112 112 from PyLucid.tools.db_dump import loaddb 113 from PyLucid.tools.Diff import make_diff 113 from PyLucid.tools.Diff import make_diff, diff_lines 114 114 from PyLucid.install.install import DB_DumpFakeOptions 115 115 from PyLucid.models import Page, Style, Template, Plugin … … 190 190 # (relative path here! Because the current work dir can chaned!) 191 191 TEST_PLUGIN_SRC = "tests/unittest_plugin/" 192 TEST_PLUGIN_DST = "PyLucid/plugins_ external/unittest_plugin"192 TEST_PLUGIN_DST = "PyLucid/plugins_internal/unittest_plugin" 193 193 194 194 … … 243 243 if txt in response.content: 244 244 error(response, "Text should not be in response: '%s'" % txt) 245 246 def assertEqual2(self, first, second): 247 """ 248 Same as the original, but display a diff on error. 249 Makes only sence if the string contains more lines (\n) 250 """ 251 if first == second: 252 # is equal, ok 253 return 254 255 error_msg = "Strings not equal:\n" 256 error_msg += "1: %r\n" % first 257 error_msg += "2: %r\n" % second 258 error_msg += "Diff:\n" 259 error_msg += diff_lines(first, second) 260 261 self.fail(error_msg) 245 262 246 263 def assertLists(self, is_list, should_be_list, sort=True): … … 434 451 """ 435 452 initialize the unittest plugin 436 -copy ./tests/unittest_plugin/ into ./PyLucid/plugins_external/ 437 -install+activate the plugin into the database 453 -copy ./tests/unittest_plugin/ into ./PyLucid/plugins_internal/ 454 455 The plugin would be installed in install_internal_plugins() as a normal Plugin. 438 456 """ 439 457 print "initialize the unittest plugin" … … 456 474 raise 457 475 458 # install_plugin(459 # package_name = "PyLucid.plugins_external",460 # plugin_name = "unittest_plugin",461 # debug = True,462 # active=True,463 # extra_verbose=True,464 # )465 476 466 477 … … 576 587 """ 577 588 load_db_dumps(verbosity) 589 init_unittest_plugin() 578 590 install_internal_plugins(verbosity) 579 591 create_users() # Create all test users 580 592 create_pages(TEST_PAGES) # Create the test pages 581 init_unittest_plugin()582 593 create_test_fixture(verbosity) 583 install_plugin( 584 package_name = "PyLucid.plugins_external", 585 plugin_name = "unittest_plugin", 586 debug = True, 587 active=True, 588 extra_verbose=True, 589 ) 594 590 595 591 596 def teardown_pylucid():