Update tests

This commit is contained in:
Zed 2021-12-26 02:23:05 +01:00
parent 92ace2bf70
commit b29b23fea2
3 changed files with 8 additions and 12 deletions

View file

@ -5,7 +5,7 @@ from parameterized import parameterized
card = [
['Thom_Wolf/status/1122466524860702729',
'pytorch/fairseq',
'Facebook AI Research Sequence-to-Sequence Toolkit written in Python. - pytorch/fairseq',
'Facebook AI Research Sequence-to-Sequence Toolkit written in Python. - GitHub - pytorch/fairseq: Facebook AI Research Sequence-to-Sequence Toolkit written in Python.',
'github.com', True],
['nim_lang/status/1136652293510717440',
@ -48,12 +48,7 @@ no_thumb = [
['nim_lang/status/1082989146040340480',
'Nim in 2018: A short recap',
'Posted in r/programming by u/miran1',
'reddit.com'],
['lorenlugosch/status/1115440394148487168',
'Fluent Speech Commands: A dataset for spoken language understanding research',
'In recent years, with the advent of deep neural networks, the accuracy of speech recognition models have been notably improved which have made possible the production of speech-to-text systems that...',
'fluent.ai']
'reddit.com']
]
playable = [

View file

@ -16,7 +16,7 @@ timeline = [
]
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', '11 Nov 2011', 'test'],
[105685475985080322, 'The Twoffice', 'TheTwoffice', '22 Aug 2011', 'regular tweet'],
[572593440719912960, 'Test account', 'mobile_test', '3 Mar 2015', 'testing test']
@ -71,7 +71,7 @@ emoji = [
retweet = [
[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 = [

View file

@ -1,5 +1,6 @@
from base import BaseTestCase, Poll, Media
from parameterized import parameterized
from selenium.webdriver.common.by import By
poll = [
['nim_lang/status/1064219801499955200', 'Style insensitivity', '91', 1, [
@ -53,8 +54,8 @@ class MediaTest(BaseTestCase):
poll_choices = self.find_elements(Poll.choice)
for i, (v, o) in enumerate(choices):
choice = poll_choices[i]
value = choice.find_element_by_class_name(Poll.value)
option = choice.find_element_by_class_name(Poll.option)
value = choice.find_element(By.CLASS_NAME, Poll.value)
option = choice.find_element(By.CLASS_NAME, Poll.option)
choice_class = choice.get_attribute('class')
self.assert_equal(v, value.text)
@ -106,7 +107,7 @@ class MediaTest(BaseTestCase):
self.assert_equal(len(rows), len(gallery_rows))
for i, row in enumerate(gallery_rows):
images = row.find_elements_by_css_selector('img')
images = row.find_elements(By.CSS_SELECTOR, 'img')
self.assert_equal(len(rows[i]), len(images))
for j, image in enumerate(images):
self.assertIn(rows[i][j], image.get_attribute('src'))