How to use get_small_name method in Airtest

Best Python code snippet using Airtest Github


Full Screen

...6 返回出版社7 {"id":1, "name":"人教版", "sequence":9, "isactive":1}8 """9 return db.ziyuan_slave.zy_press.get(id=id)10def get_small_name(book):11 """12 返回书名13 例如: 一年级(上册)14 -------------------------15 王晨光 2016-12-2316 -------------------------17 @param book: zy_book表数据18 """19 grade_name = [u'一', u'二', u'三', u'四', u'五', u'六', u'七', u'八', u'九', u"十", u"十一", u"十二"][book.grade_id - 1]20 volume_name = {1:u'上册', 2:u'下册', 3:u'全册'}.get(book.volume) or u''21 return u'%s年级(%s)' % (grade_name, volume_name)22def get_name(book):23 """24 返回书名25 例如: 人教版一年级(上册)26 -------------------------27 王晨光 2016-12-2328 -------------------------29 @param book: zy_book表数据30 """31 press = get_press(book.press_id)...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:


You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Airtest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?