You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2015/04/15 16:55:03 UTC
[4/8] allura git commit: fix more tests
fix more tests
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/445caa60
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/445caa60
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/445caa60
Branch: refs/heads/db/7870
Commit: 445caa600d1a6b81d57f034bc523cec2627fecd1
Parents: fd2c258
Author: Dave Brondsema <da...@brondsema.net>
Authored: Tue Apr 14 17:09:16 2015 -0400
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Tue Apr 14 17:38:05 2015 -0400
----------------------------------------------------------------------
Allura/allura/tests/test_globals.py | 2 +-
Allura/development.ini | 4 ++--
Allura/test.ini | 16 ++++++++--------
ForgeGit/forgegit/tests/model/test_repository.py | 5 +++--
.../forgetracker/tests/unit/test_root_controller.py | 9 ++++++---
5 files changed, 20 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/445caa60/Allura/allura/tests/test_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_globals.py b/Allura/allura/tests/test_globals.py
index 6920f6d..ca04652 100644
--- a/Allura/allura/tests/test_globals.py
+++ b/Allura/allura/tests/test_globals.py
@@ -430,7 +430,7 @@ Some text in a regular paragraph
for i in range(10):
print i
''')
- assert 'http://localhost/' in g.forge_markdown(email=True).convert('[Home]')
+ assert_in('http://localhost:8080/', g.forge_markdown(email=True).convert('[Home]'))
assert 'class="codehilite"' in g.markdown.convert('''
~~~~
def foo(): pass
http://git-wip-us.apache.org/repos/asf/allura/blob/445caa60/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index 45eb98b..9d4df9d 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -74,6 +74,7 @@ site_name = Allura
; Change these to your website's domain
domain = localhost
base_url = http://localhost:8080
+forgemail.url = http://localhost:8080
; Used to uniquify references to static resources, can be a timestamp or any unique value
; This should be updated each time you deploy (or make significant changes, like new tools, new css)
@@ -135,6 +136,7 @@ auth.ldap.suffix = ou=people,dc=localdomain
auth.ldap.admin_dn = cn=admin,dc=localdomain
auth.ldap.admin_password = secret
auth.ldap.schroot_name = scm
+auth.ldap.use_schroot = false
auth.ldap.password.algorithm = 6
auth.ldap.password.rounds = 6000
auth.ldap.password.salt_len = 16
@@ -386,8 +388,6 @@ forgemail.port = 8825
; domain suffix for your mail, change this. You also need to route *.*.*.forgemail.domain to the above host/port via
; your mail and DNS configuration
forgemail.domain = .in.localhost
-; probably unused?
-forgemail.url = http://localhost:8080
; Specify the number of projects allowed to be created by a user
; depending on the age of their user account.
http://git-wip-us.apache.org/repos/asf/allura/blob/445caa60/Allura/test.ini
----------------------------------------------------------------------
diff --git a/Allura/test.ini b/Allura/test.ini
index 6c6c945..eb43592 100644
--- a/Allura/test.ini
+++ b/Allura/test.ini
@@ -21,7 +21,7 @@
;
; This inherits all the settings from development.ini
-; and then overrides a few for testing
+; and then overrides only settings needed for tests to work.
;
[DEFAULT]
@@ -76,8 +76,8 @@ static.script_name = /nf/_static_/
static.url_base = /nf/_static_/
;
-;scm.host.ro.git = git://git.localhost$path
-;scm.host.rw.git = ssh://$username@localhost:8022/scm-repo$path
+scm.host.ro.git = git://git.localhost$path
+scm.host.rw.git = ssh://$username@localhost:8022/scm-repo$path
;scm.host.https.git = https://$username@localhost:8022/scm-repo$path
;scm.host.https_anon.git = https://localhost:8022/scm-repo$path
;scm.host.ro.hg = http://hg.localhost$path
@@ -96,20 +96,20 @@ static.url_base = /nf/_static_/
;scm.clone.svn = svn checkout --username=$username $source_url $dest_path
;
scm.repos.root = /tmp
-;scm.repos.tarball.enable = true
-;scm.repos.tarball.root = /tmp/tarball
-;scm.repos.tarball.url_prefix = file://
+scm.repos.tarball.enable = true
+scm.repos.tarball.root = /tmp/tarball
+scm.repos.tarball.url_prefix = file://
;
;bulk_export_path = /tmp/bulk_export/{nbhd}/{project}
; TODO: make this and tests match development.ini
bulk_export_filename = {project}.zip
-;bulk_export_download_instructions = Sample instructions for {project}
+; TODO: update tests and let this be true
+solr.use_new_types = false
;support_tool_choices = wiki tickets discussion
-
# markdown text longer than max length will not be converted to html
# tests expect max length of 40000
markdown_render_max_length = 40000
http://git-wip-us.apache.org/repos/asf/allura/blob/445caa60/ForgeGit/forgegit/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/model/test_repository.py b/ForgeGit/forgegit/tests/model/test_repository.py
index 3ffb2a2..854462c 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -82,6 +82,7 @@ class TestNewGit(unittest.TestCase):
'1e146e67985dcd71c74de79613719bef7bddca4a/')
all_cis = list(self.repo.log(self.rev._id, id_only=True))
assert len(all_cis) == 4
+ c.lcid_cache = {}
self.rev.tree.ls()
# print self.rev.tree.readme()
assert_equal(self.rev.tree.readme(), (
@@ -204,7 +205,7 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
with open(os.path.join(g.tmpdir, 'testgit.git/hooks/post-receive')) as f:
c = f.read()
self.assertIn(
- 'curl -s http://localhost/auth/refresh_repo/p/test/src-git/\n', c)
+ 'curl -s http://localhost:8080/auth/refresh_repo/p/test/src-git/\n', c)
self.assertIn('exec $DIR/post-receive-user\n', c)
shutil.rmtree(dirname)
@@ -238,7 +239,7 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
with open(os.path.join(g.tmpdir, 'testgit.git/hooks/post-receive')) as f:
c = f.read()
self.assertIn(
- 'curl -s http://localhost/auth/refresh_repo/p/test/src-git/\n', c)
+ 'curl -s http://localhost:8080/auth/refresh_repo/p/test/src-git/\n', c)
self.assertIn('exec $DIR/post-receive-user\n', c)
shutil.rmtree(dirname)
http://git-wip-us.apache.org/repos/asf/allura/blob/445caa60/ForgeTracker/forgetracker/tests/unit/test_root_controller.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/unit/test_root_controller.py b/ForgeTracker/forgetracker/tests/unit/test_root_controller.py
index facc28c..ae2f7a1 100644
--- a/ForgeTracker/forgetracker/tests/unit/test_root_controller.py
+++ b/ForgeTracker/forgetracker/tests/unit/test_root_controller.py
@@ -15,16 +15,19 @@
# specific language governing permissions and limitations
# under the License.
+import unittest
+
from mock import Mock, patch
from ming.orm.ormsession import session
+from pylons import tmpl_context as c
+from nose.tools import assert_equal
from allura.lib import helpers as h
from allura.model import User
-from pylons import tmpl_context as c
+
from forgetracker.tests.unit import TrackerTestWithModel
from forgetracker.model import Ticket
from forgetracker import tracker_main
-import unittest
class WithUserAndBugsApp(TrackerTestWithModel):
@@ -46,7 +49,7 @@ class TestWhenSearchingWithCustomFields(WithUserAndBugsApp):
expected = [dict(sortable_name='_iteration_number_s',
name='_iteration_number',
label='Iteration Number')]
- assert self.response['sortable_custom_fields'] == expected
+ assert_equal(self.response['sortable_custom_fields'], expected)
def test_that_tickets_are_listed(self):
assert self.response['tickets'][0].summary == 'colors are wrong'