Best Python code snippet using lisa_python
test_creating_and_deleting_css_links.py
Source:test_creating_and_deleting_css_links.py
...3from ....cache.test import assert_invalidates_cache4from ....test import assert_contains, assert_has_error_message5from ... import THEME_CACHE6@pytest.fixture7def create_link(theme):8 return reverse("misago:admin:themes:new-css-link", kwargs={"pk": theme.pk})9@pytest.fixture10def edit_link(theme, css_link):11 return reverse(12 "misago:admin:themes:edit-css-link",13 kwargs={"pk": theme.pk, "css_pk": css_link.pk},14 )15@pytest.fixture16def data():17 return {"name": "CSS link", "url": "https://example.com/cdn.css"}18def test_css_link_creation_form_is_displayed(admin_client, create_link):19 response = admin_client.get(create_link)20 assert response.status_code == 20021 assert_contains(response, "New CSS link")...
seeder_es2.py
Source:seeder_es2.py
...6 - Student: name, course7 """8 idnodo1 = obj.create_node("P", name="aa", surname="bbb", subject="ccc")9 idnodo2 = obj.create_node("S", name="ddd", course="eee")10 obj.create_link(idnodo1, idnodo2, "LABEL")11 p1 = obj.create_node("P", name="Marco", surname="Rossi", subject="matematica")12 p2 = obj.create_node("P", name="Mario", surname="Bianchi", subject="inglese")13 p3 = obj.create_node("P", name="Andrea", surname="Verdi", subject="reti")14 p4 = obj.create_node("P", name="Antonio", surname="Russo", subject="ML")15 p5 = obj.create_node("P", name="Chiara", surname="Esposito", subject="statistica")16 p6 = obj.create_node("P", name="Maria", surname="Mariani", subject="AI")17 s1 = obj.create_node("S", name="Luigi", course="ML")18 s2 = obj.create_node("S", name="Mario", course="ML")19 s3 = obj.create_node("S", name="Martina", course="ML")20 s4 = obj.create_node("S", name="Giulia", course="ML")21 s5 = obj.create_node("S", name="Edoardp", course="ML")22 s6 = obj.create_node("S", name="Francesco", course="ML")23 s7 = obj.create_node("S", name="Mattia", course="ML")24 s8 = obj.create_node("S", name="Luca", course="smart")25 s9 = obj.create_node("S", name="Giuseppe", course="smart")26 s10 = obj.create_node("S", name="Franco", course="smart")27 s11 = obj.create_node("S", name="Giorgia", course="smart")28 s12 = obj.create_node("S", name="Marco", course="smart")29 a1 = obj.create_node("C", name="tesla", desc="auto")30 a2 = obj.create_node("C", name="atzure", desc="cloud")31 a3 = obj.create_node("C", name="amazon", desc="e-commerce")32 a4 = obj.create_node("C", name="ibm", desc="IT")33 a5 = obj.create_node("C", name="apple", desc="device")34 obj.create_link( s1, a1, "lavora_in")35 obj.create_link( s2, a2, "lavora_in")36 obj.create_link( s3, a3, "lavora_in")37 obj.create_link( s4, a4, "lavora_in")38 obj.create_link( s5, a4, "lavora_in")39 obj.create_link( s6, a1, "lavora_in")40 obj.create_link( s7, a2, "lavora_in")41 obj.create_link( s8, a1, "lavora_in")42 obj.create_link( p1, s1, "insegna_a")43 obj.create_link( p1, s2, "insegna_a")44 obj.create_link( p1, s3, "insegna_a")45 obj.create_link( p1, s4, "insegna_a")46 obj.create_link( p1, s5, "insegna_a")47 obj.create_link( p2, s6, "insegna_a")48 obj.create_link( p2, s7, "insegna_a")49 obj.create_link( p3, s8, "insegna_a")50 obj.create_link( p3, s9, "insegna_a")51 obj.create_link( p4, s9, "insegna_a")52 obj.create_link( p4, s10, "insegna_a")53 obj.create_link( p4, s11, "insegna_a")54 obj.create_link( p4, s12, "insegna_a")55 obj.create_link( p5, s12, "insegna_a")56 obj.create_link(p6, a5, "contatto_in")57 obj.create_link(p1, a1, "contatto_in")58 obj.create_link(p1, a2, "contatto_in")59 obj.create_link(p1, a3, "contatto_in")60 obj.create_link(p5, a4, "contatto_in")61 obj.create_link(p5, a1, "contatto_in")62 obj.create_link(p4, a3, "contatto_in")63 obj.create_link(p5, a3, "contatto_in")64if __name__ == '__main__':...
setup.py
Source:setup.py
...24 'uwsgi',25 'fixdep',26 'python-twitter==3.0rc1',27]28def create_link(name, version):29 data = {30 'prefix': 'https://github.com/socek',31 'name': name,32 'version': version,33 }34 template = '%(prefix)s/%(name)s/tarball/master#egg=%(name)s-%(version)s'35 return template % data36dependency_links = [37 # create_link('impaf', '0.1'),38 # create_link('impaf-jinja2', '0.1'),39 # create_link('impaf-haml', '0.1'),40 # create_link('impaf-beaker', '0.1'),41 # create_link('impaf-sqlalchemy', '0.1'),42 # create_link('impaf-alembic', '0.1'),43 # create_link('impaf-fanstatic', '0.1.1'),44 # create_link('impaf-formskit', '0.1.2'),45 # create_link('impaf-flashmsg', '0.1'),46 # create_link('impaf-auth', '0.1'),47 # create_link('bael.project', '0.2'),48 # create_link('baelfire', '0.3.1'),49 # create_link('formskit', '0.5.4.10'),50]51if __name__ == '__main__':52 setup(53 name='impex',54 version='0.1',55 packages=find_packages('src'),56 package_dir={'': 'src'},57 install_requires=install_requires,58 dependency_links=dependency_links,59 include_package_data=True,60 entry_points={61 'fanstatic.libraries': (62 'home = impex.home.resources:library',63 'impex = impex.application.resources:library',...
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.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!