mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-26 00:27:12 +01:00
cleanup class and nameing
This commit is contained in:
parent
0abd2fd16a
commit
0e51e780b6
1 changed files with 6 additions and 6 deletions
|
@ -352,7 +352,9 @@ class TestUpdater:
|
||||||
self.update_id = int(args[0])
|
self.update_id = int(args[0])
|
||||||
raise error
|
raise error
|
||||||
|
|
||||||
class fakeUpdate(object):
|
class FakeUpdate():
|
||||||
|
def __init__(self, update_id):
|
||||||
|
self.update_id = update_id
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# case 1
|
# case 1
|
||||||
|
@ -365,13 +367,11 @@ class TestUpdater:
|
||||||
# returns list of 3 objects with
|
# returns list of 3 objects with
|
||||||
# update_id's 1, 2 and 3
|
# update_id's 1, 2 and 3
|
||||||
i = 1
|
i = 1
|
||||||
ls = []
|
updates = []
|
||||||
while i < (expected_id):
|
while i < (expected_id):
|
||||||
o = fakeUpdate()
|
updates.append(FakeUpdate(i))
|
||||||
o.update_id = i
|
|
||||||
ls.append(o)
|
|
||||||
i += 1
|
i += 1
|
||||||
return ls
|
return updates
|
||||||
|
|
||||||
monkeypatch.setattr(updater.bot, 'get_updates', get_updates)
|
monkeypatch.setattr(updater.bot, 'get_updates', get_updates)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue