Merge "change assert(Not)Equals to assert(Not)Equal" into feature/zuulv3

This commit is contained in:
Zuul 2017-09-15 04:43:46 +00:00 committed by Gerrit Code Review
commit 0bdf51ecda
4 changed files with 22 additions and 22 deletions

View File

@ -304,7 +304,7 @@ class TestConfigConflict(ZuulTestCase):
def test_conflict_config(self):
tenant = self.sched.abide.tenants.get('tenant-one')
jobs = sorted(tenant.layout.jobs.keys())
self.assertEquals(
self.assertEqual(
['base', 'noop', 'trusted-zuul.yaml-job',
'untrusted-zuul.yaml-job'],
jobs)

View File

@ -35,17 +35,17 @@ class TestExecutorRepos(ZuulTestCase):
'Project %s commit for build %s #%s should '
'not have a detached HEAD' % (
project, build, number))
self.assertEquals(repo.active_branch.name,
state['branch'],
'Project %s commit for build %s #%s should '
'be on the correct branch' % (
project, build, number))
self.assertEqual(repo.active_branch.name,
state['branch'],
'Project %s commit for build %s #%s should '
'be on the correct branch' % (
project, build, number))
if 'commit' in state:
self.assertEquals(state['commit'],
str(repo.commit('HEAD')),
'Project %s commit for build %s #%s should '
'be correct' % (
project, build, number))
self.assertEqual(state['commit'],
str(repo.commit('HEAD')),
'Project %s commit for build %s #%s should '
'be correct' % (
project, build, number))
ref = repo.commit('HEAD')
repo_messages = set(
[c.message.strip() for c in repo.iter_commits(ref)])
@ -93,7 +93,7 @@ class TestExecutorRepos(ZuulTestCase):
self.waitUntilSettled()
self.assertEquals(2, len(self.builds), "Two builds are running")
self.assertEqual(2, len(self.builds), "Two builds are running")
upstream = self.getUpstreamRepos(projects)
states = [
@ -133,7 +133,7 @@ class TestExecutorRepos(ZuulTestCase):
self.waitUntilSettled()
self.assertEquals(3, len(self.builds), "Three builds are running")
self.assertEqual(3, len(self.builds), "Three builds are running")
upstream = self.getUpstreamRepos(projects)
states = [
@ -194,7 +194,7 @@ class TestExecutorRepos(ZuulTestCase):
self.waitUntilSettled()
self.assertEquals(4, len(self.builds), "Four builds are running")
self.assertEqual(4, len(self.builds), "Four builds are running")
upstream = self.getUpstreamRepos(projects)
states = [
@ -283,7 +283,7 @@ class TestExecutorRepos(ZuulTestCase):
time.sleep(1)
self.waitUntilSettled()
self.assertEquals(1, len(self.builds), "One build is running")
self.assertEqual(1, len(self.builds), "One build is running")
upstream = self.getUpstreamRepos(projects)
states = [
@ -326,7 +326,7 @@ class TestExecutorRepos(ZuulTestCase):
time.sleep(1)
self.waitUntilSettled()
self.assertEquals(2, len(self.builds), "Two builds are running")
self.assertEqual(2, len(self.builds), "Two builds are running")
upstream = self.getUpstreamRepos(projects)
states = [

View File

@ -63,11 +63,11 @@ class TestGerrit(BaseTestCase):
result = gerrit.simpleQuery('project:openstack-infra/zuul')
_ssh_mock.assert_has_calls(calls)
self.assertEquals(len(calls), _ssh_mock.call_count,
'_ssh should be called %d times' % len(calls))
self.assertEqual(len(calls), _ssh_mock.call_count,
'_ssh should be called %d times' % len(calls))
self.assertIsNotNone(result, 'Result is not none')
self.assertEquals(len(result), expected_patches,
'There must be %d patches.' % expected_patches)
self.assertEqual(len(result), expected_patches,
'There must be %d patches.' % expected_patches)
def test_simple_query_pagination_new(self):
files = ['simple_query_pagination_new_1',

View File

@ -65,12 +65,12 @@ class TestMergerRepo(ZuulTestCase):
os.path.join(self.workspace_root, 'subdir', '.git')),
msg='Cloned over the submodule placeholder')
self.assertEquals(
self.assertEqual(
os.path.join(self.upstream_root, 'org/project1'),
work_repo.createRepoObject().remotes[0].url,
message="Parent clone still point to upstream project1")
self.assertEquals(
self.assertEqual(
os.path.join(self.upstream_root, 'org/project2'),
sub_repo.createRepoObject().remotes[0].url,
message="Sub repository points to upstream project2")