From 28527c6fee2ffa681299bc0978852588894112db Mon Sep 17 00:00:00 2001 From: mutantmonkey Date: Sat, 2 Jun 2012 03:07:22 -0700 Subject: [PATCH] use called is True instead of called == 1 --- modules/test/test_commit.py | 2 +- modules/test/test_mylife.py | 12 ++++++------ modules/test/test_search.py | 11 ++++++----- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/modules/test/test_commit.py b/modules/test/test_commit.py index f045e2a..bb79f57 100644 --- a/modules/test/test_commit.py +++ b/modules/test/test_commit.py @@ -14,4 +14,4 @@ class TestCommit(unittest.TestCase): def test_commit(self): commit(self.phenny, None) - assert self.phenny.reply.called == 1 + assert self.phenny.reply.called is True diff --git a/modules/test/test_mylife.py b/modules/test/test_mylife.py index 53ff31f..38eb691 100644 --- a/modules/test/test_mylife.py +++ b/modules/test/test_mylife.py @@ -14,25 +14,25 @@ class TestMylife(unittest.TestCase): def test_fml(self): mylife.fml(self.phenny, None) - assert self.phenny.say.called == 1 + assert self.phenny.say.called is True def test_mlia(self): mylife.mlia(self.phenny, None) - assert self.phenny.say.called == 1 + assert self.phenny.say.called is True def test_mlib(self): mylife.mlib(self.phenny, None) - assert self.phenny.say.called == 1 + assert self.phenny.say.called is True def test_mlih(self): mylife.mlih(self.phenny, None) - assert self.phenny.say.called == 1 + assert self.phenny.say.called is True def test_mlihp(self): mylife.mlihp(self.phenny, None) - assert self.phenny.say.called == 1 + assert self.phenny.say.called is True def test_mlit(self): mylife.mlit(self.phenny, None) - assert self.phenny.say.called == 1 + assert self.phenny.say.called is True diff --git a/modules/test/test_search.py b/modules/test/test_search.py index 5ef9e5e..1ad8567 100644 --- a/modules/test/test_search.py +++ b/modules/test/test_search.py @@ -47,7 +47,7 @@ class TestSearch(unittest.TestCase): input = Mock(group=lambda x: 'vtluug virginia phenny') gcs(self.phenny, input) - assert self.phenny.say.called == 1 + assert self.phenny.say.called is True def test_bing_search(self): out = bing_search('phenny') @@ -59,7 +59,7 @@ class TestSearch(unittest.TestCase): input = Mock(group=lambda x: 'swhack') bing(self.phenny, input) - assert self.phenny.reply.called == 1 + assert self.phenny.reply.called is True def test_duck_search(self): out = duck_search('phenny') @@ -71,16 +71,17 @@ class TestSearch(unittest.TestCase): input = Mock(group=lambda x: 'swhack') duck(self.phenny, input) - assert self.phenny.reply.called == 1 + assert self.phenny.reply.called is True def test_search(self): input = Mock(group=lambda x: 'vtluug') duck(self.phenny, input) - assert self.phenny.reply.called == 1 + assert self.phenny.reply.called is True def test_suggest(self): input = Mock(group=lambda x: 'vtluug') suggest(self.phenny, input) - assert (self.phenny.reply.called == 1 or self.phenny.say.called == 1) + assert (self.phenny.reply.called is True or \ + self.phenny.say.called is True)