use called is True instead of called == 1
parent
ed2a892187
commit
28527c6fee
|
@ -14,4 +14,4 @@ class TestCommit(unittest.TestCase):
|
||||||
|
|
||||||
def test_commit(self):
|
def test_commit(self):
|
||||||
commit(self.phenny, None)
|
commit(self.phenny, None)
|
||||||
assert self.phenny.reply.called == 1
|
assert self.phenny.reply.called is True
|
||||||
|
|
|
@ -14,25 +14,25 @@ class TestMylife(unittest.TestCase):
|
||||||
|
|
||||||
def test_fml(self):
|
def test_fml(self):
|
||||||
mylife.fml(self.phenny, None)
|
mylife.fml(self.phenny, None)
|
||||||
assert self.phenny.say.called == 1
|
assert self.phenny.say.called is True
|
||||||
|
|
||||||
def test_mlia(self):
|
def test_mlia(self):
|
||||||
mylife.mlia(self.phenny, None)
|
mylife.mlia(self.phenny, None)
|
||||||
assert self.phenny.say.called == 1
|
assert self.phenny.say.called is True
|
||||||
|
|
||||||
def test_mlib(self):
|
def test_mlib(self):
|
||||||
mylife.mlib(self.phenny, None)
|
mylife.mlib(self.phenny, None)
|
||||||
assert self.phenny.say.called == 1
|
assert self.phenny.say.called is True
|
||||||
|
|
||||||
def test_mlih(self):
|
def test_mlih(self):
|
||||||
mylife.mlih(self.phenny, None)
|
mylife.mlih(self.phenny, None)
|
||||||
assert self.phenny.say.called == 1
|
assert self.phenny.say.called is True
|
||||||
|
|
||||||
def test_mlihp(self):
|
def test_mlihp(self):
|
||||||
mylife.mlihp(self.phenny, None)
|
mylife.mlihp(self.phenny, None)
|
||||||
assert self.phenny.say.called == 1
|
assert self.phenny.say.called is True
|
||||||
|
|
||||||
def test_mlit(self):
|
def test_mlit(self):
|
||||||
mylife.mlit(self.phenny, None)
|
mylife.mlit(self.phenny, None)
|
||||||
assert self.phenny.say.called == 1
|
assert self.phenny.say.called is True
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ class TestSearch(unittest.TestCase):
|
||||||
input = Mock(group=lambda x: 'vtluug virginia phenny')
|
input = Mock(group=lambda x: 'vtluug virginia phenny')
|
||||||
gcs(self.phenny, input)
|
gcs(self.phenny, input)
|
||||||
|
|
||||||
assert self.phenny.say.called == 1
|
assert self.phenny.say.called is True
|
||||||
|
|
||||||
def test_bing_search(self):
|
def test_bing_search(self):
|
||||||
out = bing_search('phenny')
|
out = bing_search('phenny')
|
||||||
|
@ -59,7 +59,7 @@ class TestSearch(unittest.TestCase):
|
||||||
input = Mock(group=lambda x: 'swhack')
|
input = Mock(group=lambda x: 'swhack')
|
||||||
bing(self.phenny, input)
|
bing(self.phenny, input)
|
||||||
|
|
||||||
assert self.phenny.reply.called == 1
|
assert self.phenny.reply.called is True
|
||||||
|
|
||||||
def test_duck_search(self):
|
def test_duck_search(self):
|
||||||
out = duck_search('phenny')
|
out = duck_search('phenny')
|
||||||
|
@ -71,16 +71,17 @@ class TestSearch(unittest.TestCase):
|
||||||
input = Mock(group=lambda x: 'swhack')
|
input = Mock(group=lambda x: 'swhack')
|
||||||
duck(self.phenny, input)
|
duck(self.phenny, input)
|
||||||
|
|
||||||
assert self.phenny.reply.called == 1
|
assert self.phenny.reply.called is True
|
||||||
|
|
||||||
def test_search(self):
|
def test_search(self):
|
||||||
input = Mock(group=lambda x: 'vtluug')
|
input = Mock(group=lambda x: 'vtluug')
|
||||||
duck(self.phenny, input)
|
duck(self.phenny, input)
|
||||||
|
|
||||||
assert self.phenny.reply.called == 1
|
assert self.phenny.reply.called is True
|
||||||
|
|
||||||
def test_suggest(self):
|
def test_suggest(self):
|
||||||
input = Mock(group=lambda x: 'vtluug')
|
input = Mock(group=lambda x: 'vtluug')
|
||||||
suggest(self.phenny, input)
|
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)
|
||||||
|
|
Loading…
Reference in New Issue