@@ -33,7 +33,6 @@ class TestContact(object):
3333 first_name = 'Leandro'
3434 last_name = 'Toledo'
3535 user_id = 23
36- vcard = 'vCard'
3736
3837 def test_de_json_required (self , bot ):
3938 json_dict = {'phone_number' : self .phone_number , 'first_name' : self .first_name }
@@ -44,22 +43,19 @@ def test_de_json_required(self, bot):
4443
4544 def test_de_json_all (self , bot ):
4645 json_dict = {'phone_number' : self .phone_number , 'first_name' : self .first_name ,
47- 'last_name' : self .last_name , 'user_id' : self .user_id ,
48- 'vcard' : self .vcard }
46+ 'last_name' : self .last_name , 'user_id' : self .user_id }
4947 contact = Contact .de_json (json_dict , bot )
5048
5149 assert contact .phone_number == self .phone_number
5250 assert contact .first_name == self .first_name
5351 assert contact .last_name == self .last_name
5452 assert contact .user_id == self .user_id
55- assert contact .vcard == self .vcard
5653
5754 def test_send_with_contact (self , monkeypatch , bot , chat_id , contact ):
5855 def test (_ , url , data , ** kwargs ):
5956 phone = data ['phone_number' ] == contact .phone_number
6057 first = data ['first_name' ] == contact .first_name
6158 last = data ['last_name' ] == contact .last_name
62- vcard = data ['vcard' ] == contact .vcard
6359 return phone and first and last
6460
6561 monkeypatch .setattr ('telegram.utils.request.Request.post' , test )
@@ -78,7 +74,6 @@ def test_to_dict(self, contact):
7874 assert contact_dict ['first_name' ] == contact .first_name
7975 assert contact_dict ['last_name' ] == contact .last_name
8076 assert contact_dict ['user_id' ] == contact .user_id
81- assert contact_dict ['vcard' ] == contact .vcard
8277
8378 def test_equality (self ):
8479 a = Contact (self .phone_number , self .first_name )
0 commit comments