Created
July 13, 2015 22:27
-
-
Save rail/7011b5441fb9bb47db74 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/python/mozilla_buildtools/test/test_balrog_submitter_cli.py b/lib/python/mozilla_buildtools/test/test_balrog_submitter_cli.py | |
index b06b084..831ffa6 100644 | |
--- a/lib/python/mozilla_buildtools/test/test_balrog_submitter_cli.py | |
+++ b/lib/python/mozilla_buildtools/test/test_balrog_submitter_cli.py | |
@@ -1,10 +1,13 @@ | |
-import unittest | |
-import sys | |
+try: | |
+ # Python 2.6 backport with assertDictEqual() | |
+ import unittest2 as unittest | |
+except ImportError: | |
+ import unittest | |
from balrog.submitter.cli import NightlySubmitterBase, NightlySubmitterV4 | |
from balrog.submitter.updates import merge_partial_updates | |
class TestNightlySubmitterBase(unittest.TestCase): | |
def test_replace_canocical_url(self): | |
url_replacements = [ | |
("ftp.mozilla.org", "download.cdn.mozilla.net") | |
@@ -16,18 +19,16 @@ class TestNightlySubmitterBase(unittest.TestCase): | |
submitter._replace_canocical_url( | |
'http://ftp.mozilla.org/pub/mozilla.org/some/file') | |
) | |
class TestNightlySubmitterV4(unittest.TestCase): | |
def test_canonical_ur_replacement(self): | |
- if sys.version_info < (2, 7): | |
- return | |
url_replacements = [ | |
("ftp.mozilla.org", "download.cdn.mozilla.net") | |
] | |
submitter = NightlySubmitterV4(api_root=None, auth=None, | |
url_replacements=url_replacements) | |
completeInfo = [{ | |
'size': 123, | |
'hash': 'abcd', | |
@@ -39,18 +40,16 @@ class TestNightlySubmitterV4(unittest.TestCase): | |
{'completes': [{ | |
'fileUrl': 'http://download.cdn.mozilla.net/url', | |
'filesize': 123, | |
'from': '*', | |
'hashValue': 'abcd' | |
}]}) | |
def test_no_canonical_ur_replacement(self): | |
- if sys.version_info < (2, 7): | |
- return | |
submitter = NightlySubmitterV4(api_root=None, auth=None, | |
url_replacements=None) | |
completeInfo = [{ | |
'size': 123, | |
'hash': 'abcd', | |
'url': 'http://ftp.mozilla.org/url' | |
}] | |
data = submitter._get_update_data("prod", "brnch", completeInfo) | |
diff --git a/lib/python/vendorlibs.pth b/lib/python/vendorlibs.pth | |
index 2d6ec58..84bd6ad 100644 | |
--- a/lib/python/vendorlibs.pth | |
+++ b/lib/python/vendorlibs.pth | |
@@ -4,8 +4,9 @@ vendor/python-daemon-1.5.5/ | |
vendor/requests-2.7.0/ | |
vendor/mozpoolclient-0.1.6/ | |
vendor/Jinja2-2.7.3/ | |
vendor/MarkupSafe-0.23/ | |
vendor/redo-1.4.1/ | |
vendor/jsonmerge-1.1.0/ | |
vendor/jsonschema-2.5.1/ | |
vendor/functools32-3.2.3-2/ | |
+vendor/repoze.lru-0.6/ | |
diff --git a/tox.ini b/tox.ini | |
index 1f41ae3..cf8164d 100644 | |
--- a/tox.ini | |
+++ b/tox.ini | |
@@ -43,12 +43,13 @@ deps= | |
commands= | |
coveralls | |
[testenv:py26-hg2.6] | |
basepython = python2.6 | |
deps = | |
{[base]deps} | |
mercurial==2.6.2 | |
+ unittest2==1.1.0 | |
[pep8] | |
max-line-length = 159 | |
exclude = vendor,.tox, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment