mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-13 03:26:30 +00:00
Update tests
This commit is contained in:
parent
768ec3632f
commit
84dfcd089a
5 changed files with 17 additions and 17 deletions
|
@ -39,7 +39,7 @@ class Tweet(object):
|
||||||
class Profile(object):
|
class Profile(object):
|
||||||
fullname = '.profile-card-fullname'
|
fullname = '.profile-card-fullname'
|
||||||
username = '.profile-card-username'
|
username = '.profile-card-username'
|
||||||
protected = '.protected-icon'
|
protected = '.icon-lock-circled'
|
||||||
verified = '.verified-icon'
|
verified = '.verified-icon'
|
||||||
banner = '.profile-banner'
|
banner = '.profile-banner'
|
||||||
bio = '.profile-bio'
|
bio = '.profile-bio'
|
||||||
|
|
|
@ -11,12 +11,12 @@ card = [
|
||||||
['Bountysource/status/1141879700639215617',
|
['Bountysource/status/1141879700639215617',
|
||||||
'$1,000 Bounty on kivy/plyer',
|
'$1,000 Bounty on kivy/plyer',
|
||||||
'Automation and Screen Reader Support',
|
'Automation and Screen Reader Support',
|
||||||
'bountysource.com', 'TF5vo84K', False],
|
'bountysource.com', '1161324818224078848', False],
|
||||||
|
|
||||||
['lorenlugosch/status/1115440394148487168',
|
['lorenlugosch/status/1115440394148487168',
|
||||||
'lorenlugosch/pretrain_speech_model',
|
'lorenlugosch/pretrain_speech_model',
|
||||||
'Speech Model Pre-training for End-to-End Spoken Language Understanding - lorenlugosch/pretrain_speech_model',
|
'Speech Model Pre-training for End-to-End Spoken Language Understanding - lorenlugosch/pretrain_speech_model',
|
||||||
'github.com', 'VwMnYBVh', False],
|
'github.com', '1161172194040246272', False],
|
||||||
|
|
||||||
['PyTorch/status/1123379369672450051',
|
['PyTorch/status/1123379369672450051',
|
||||||
'PyTorch',
|
'PyTorch',
|
||||||
|
@ -31,7 +31,7 @@ card = [
|
||||||
['TheTwoffice/status/558685306090946561',
|
['TheTwoffice/status/558685306090946561',
|
||||||
'Eternity: a moment standing still forever…',
|
'Eternity: a moment standing still forever…',
|
||||||
'- James Montgomery. | facebook | 500px | ferpectshotz | I dusted off this one from my old archives, it was taken while I was living in mighty new York city working at Wall St. I think this was the 11...',
|
'- James Montgomery. | facebook | 500px | ferpectshotz | I dusted off this one from my old archives, it was taken while I was living in mighty new York city working at Wall St. I think this was the 11...',
|
||||||
'flickr.com', '1LT6fSLU', True],
|
'flickr.com', '161236662619389953', True],
|
||||||
|
|
||||||
['nim_lang/status/1136652293510717440',
|
['nim_lang/status/1136652293510717440',
|
||||||
'Version 0.20.0 released',
|
'Version 0.20.0 released',
|
||||||
|
@ -51,7 +51,7 @@ card = [
|
||||||
['voidtarget/status/1094632512926605312',
|
['voidtarget/status/1094632512926605312',
|
||||||
'Basic OBS Studio plugin, written in nim, supporting C++ (C fine too)',
|
'Basic OBS Studio plugin, written in nim, supporting C++ (C fine too)',
|
||||||
'Basic OBS Studio plugin, written in nim, supporting C++ (C fine too) - obsplugin.nim',
|
'Basic OBS Studio plugin, written in nim, supporting C++ (C fine too) - obsplugin.nim',
|
||||||
'gist.github.com', '37n4WuBF', True],
|
'gist.github.com', '1160647657574076423', True],
|
||||||
|
|
||||||
['AdsAPI/status/1110272721005367296',
|
['AdsAPI/status/1110272721005367296',
|
||||||
'Conversation Targeting',
|
'Conversation Targeting',
|
||||||
|
@ -67,7 +67,7 @@ card = [
|
||||||
no_thumb = [
|
no_thumb = [
|
||||||
['nim_lang/status/1082989146040340480',
|
['nim_lang/status/1082989146040340480',
|
||||||
'Nim in 2018: A short recap',
|
'Nim in 2018: A short recap',
|
||||||
'Posted in r/programming by u/miran1 • 38 points and 46 comments',
|
'Posted in r/programming by u/miran1 • 36 points and 46 comments',
|
||||||
'reddit.com'],
|
'reddit.com'],
|
||||||
|
|
||||||
['brent_p/status/1088857328680488961',
|
['brent_p/status/1088857328680488961',
|
||||||
|
@ -80,17 +80,17 @@ playable = [
|
||||||
['nim_lang/status/1118234460904919042',
|
['nim_lang/status/1118234460904919042',
|
||||||
'Nim development blog 2019-03',
|
'Nim development blog 2019-03',
|
||||||
'Arne (aka Krux02) * debugging: * improved nim-gdb, $ works, framefilter * alias for --debugger:native: -g * bugs: * forwarding of .pure. * sizeof union * fea...',
|
'Arne (aka Krux02) * debugging: * improved nim-gdb, $ works, framefilter * alias for --debugger:native: -g * bugs: * forwarding of .pure. * sizeof union * fea...',
|
||||||
'youtube.com', 'rJkABhGF'],
|
'youtube.com', '1161613174514290688'],
|
||||||
|
|
||||||
['nim_lang/status/1121090879823986688',
|
['nim_lang/status/1121090879823986688',
|
||||||
'Nim - First natively compiled language w/ hot code-reloading at...',
|
'Nim - First natively compiled language w/ hot code-reloading at...',
|
||||||
'#nim #c++ #ACCUConf Nim is a statically typed systems and applications programming language which offers perhaps some of the most powerful metaprogramming ca...',
|
'#nim #c++ #ACCUConf Nim is a statically typed systems and applications programming language which offers perhaps some of the most powerful metaprogramming ca...',
|
||||||
'youtube.com', 'FuFgnQ9PA'],
|
'youtube.com', '1161379576087568386'],
|
||||||
|
|
||||||
['lele/status/819930645145288704',
|
['lele/status/819930645145288704',
|
||||||
'Eurocrash presents Open Decks - emerging dj #4: E-Musik',
|
'Eurocrash presents Open Decks - emerging dj #4: E-Musik',
|
||||||
"OPEN DECKS is Eurocrash's new project about discovering new and emerging dj talents. Every selected dj will have the chance to perform the first dj-set in front of an actual audience. The best dj...",
|
"OPEN DECKS is Eurocrash's new project about discovering new and emerging dj talents. Every selected dj will have the chance to perform the first dj-set in front of an actual audience. The best dj...",
|
||||||
'mixcloud.com', 'FdM8jyi04']
|
'mixcloud.com', '161048988763795457']
|
||||||
]
|
]
|
||||||
|
|
||||||
promo = [
|
promo = [
|
||||||
|
|
|
@ -4,15 +4,15 @@ from parameterized import parameterized
|
||||||
profiles = [
|
profiles = [
|
||||||
['mobile_test', 'Test account',
|
['mobile_test', 'Test account',
|
||||||
'Test Account. test test Testing username with @mobile_test_2 and a #hashtag',
|
'Test Account. test test Testing username with @mobile_test_2 and a #hashtag',
|
||||||
'📍 San Francisco, CA', '🔗 example.com/foobar', '📅 Joined October 2009', '100'],
|
'San Francisco, CA', 'example.com/foobar', 'Joined October 2009', '100'],
|
||||||
['mobile_test_2', 'mobile test 2', '', '', '', '📅 Joined January 2011', '13']
|
['mobile_test_2', 'mobile test 2', '', '', '', 'Joined January 2011', '13']
|
||||||
]
|
]
|
||||||
|
|
||||||
verified = [['jack'], ['elonmusk']]
|
verified = [['jack'], ['elonmusk']]
|
||||||
|
|
||||||
protected = [
|
protected = [
|
||||||
['mobile_test_7', 'mobile test 7🔒', ''],
|
['mobile_test_7', 'mobile test 7', ''],
|
||||||
['Poop', 'Randy🔒', 'Social media fanatic.']
|
['Poop', 'Randy', 'Social media fanatic.']
|
||||||
]
|
]
|
||||||
|
|
||||||
invalid = [['thisprofiledoesntexist'], ['%']]
|
invalid = [['thisprofiledoesntexist'], ['%']]
|
||||||
|
@ -39,7 +39,7 @@ class ProfileTest(BaseTestCase):
|
||||||
(location, Profile.location),
|
(location, Profile.location),
|
||||||
(website, Profile.website),
|
(website, Profile.website),
|
||||||
(joinDate, Profile.joinDate),
|
(joinDate, Profile.joinDate),
|
||||||
(f"🖼 {mediaCount} Photos and videos", Profile.mediaCount)
|
(mediaCount + " Photos and videos", Profile.mediaCount)
|
||||||
]
|
]
|
||||||
|
|
||||||
for text, selector in tests:
|
for text, selector in tests:
|
||||||
|
|
|
@ -16,7 +16,7 @@ timeline = [
|
||||||
]
|
]
|
||||||
|
|
||||||
status = [
|
status = [
|
||||||
[20, 'jack 🌍🌏🌎✔', 'jack', '21 Mar 2006', 'just setting up my twttr'],
|
[20, 'jack 🌍🌏🌎', 'jack', '21 Mar 2006', 'just setting up my twttr'],
|
||||||
[134849778302464000, 'The Twoffice', 'TheTwoffice', '10 Nov 2011', 'test'],
|
[134849778302464000, 'The Twoffice', 'TheTwoffice', '10 Nov 2011', 'test'],
|
||||||
[105685475985080322, 'The Twoffice', 'TheTwoffice', '22 Aug 2011', 'regular tweet'],
|
[105685475985080322, 'The Twoffice', 'TheTwoffice', '22 Aug 2011', 'regular tweet'],
|
||||||
[572593440719912960, 'Test account', 'mobile_test', '2 Mar 2015', 'testing test']
|
[572593440719912960, 'Test account', 'mobile_test', '2 Mar 2015', 'testing test']
|
||||||
|
@ -77,7 +77,7 @@ emoji = [
|
||||||
|
|
||||||
retweet = [
|
retweet = [
|
||||||
[7, 'mobile_test_2', 'mobile test 2', 'Test account', '@mobile_test', '1234'],
|
[7, 'mobile_test_2', 'mobile test 2', 'Test account', '@mobile_test', '1234'],
|
||||||
[3, 'mobile_test_8', 'mobile test 8', 'jack 🌍🌏🌎✔', '@jack', 'twttr']
|
[3, 'mobile_test_8', 'mobile test 8', 'jack 🌍🌏🌎', '@jack', 'twttr']
|
||||||
]
|
]
|
||||||
|
|
||||||
reply = [
|
reply = [
|
||||||
|
|
|
@ -92,7 +92,7 @@ class MediaTest(BaseTestCase):
|
||||||
self.assert_element_visible(Media.container)
|
self.assert_element_visible(Media.container)
|
||||||
self.assert_element_visible(Media.video)
|
self.assert_element_visible(Media.video)
|
||||||
|
|
||||||
video_thumb = self.get_attribute('video', 'poster')
|
video_thumb = self.get_attribute(Media.video + ' img', 'src')
|
||||||
self.assertIn(thumb, video_thumb)
|
self.assertIn(thumb, video_thumb)
|
||||||
|
|
||||||
@parameterized.expand(gallery)
|
@parameterized.expand(gallery)
|
||||||
|
|
Loading…
Reference in a new issue