How to use test_zip_file method in avocado

Best Python code snippet using avocado_python

literals.py

Source:literals.py Github

copy

Full Screen

1import os2from django.conf import settings3EXCLUDE_TEST_TAG = 'exclude'4TEST_ERROR_LOG_ENTRY_RESULT = 'test_error_log_entry_result_text'5TEST_VIEW_NAME = 'test view name'6TEST_VIEW_URL = 'test-view-url'7# Filenames8TEST_ARCHIVE_MSG_STRANGE_DATE_FILENAME = 'strangeDate.msg'9TEST_ARCHIVE_ZIP_SPECIAL_CHARACTERS_FILENAME_MEMBER = 'test_archvive_with_special_characters_filename_member.zip'10TEST_ARCHIVE_ZIP_CP437_MEMBER = 'test_archvive_with_cp437_member.zip'11TEST_FILENAME1 = 'test_file1.txt'12TEST_FILENAME2 = 'test_file2.txt'13TEST_FILENAME3 = 'test_file3.txt'14TEST_FILE_CONTENTS_1 = b'TEST FILE 1\n'15TEST_FILE_CONTENTS_2 = 'TEST FILE 2\n'16TEST_TAR_BZ2_FILE = 'test_file.tar.bz2'17TEST_TAR_FILE = 'test_file.tar'18TEST_TAR_GZ_FILE = 'test_file.tar.gz'19TEST_ZIP_FILE = 'test_file.zip'20TEST_COMPRESSED_FILE_CONTENTS = [TEST_FILENAME1, TEST_FILENAME2]21# File paths22TEST_ARCHIVE_MSG_STRANGE_DATE_PATH = os.path.join(23 settings.BASE_DIR, 'apps', 'common', 'tests', 'contrib',24 TEST_ARCHIVE_MSG_STRANGE_DATE_FILENAME25)26TEST_ARCHIVE_ZIP_SPECIAL_CHARACTERS_FILENAME_MEMBER_PATH = os.path.join(27 settings.BASE_DIR, 'apps', 'common', 'tests', 'contrib',28 TEST_ARCHIVE_ZIP_SPECIAL_CHARACTERS_FILENAME_MEMBER29)30TEST_ARCHIVE_ZIP_CP437_MEMBER_PATH = os.path.join(31 settings.BASE_DIR, 'apps', 'common', 'tests', 'contrib',32 TEST_ARCHIVE_ZIP_CP437_MEMBER33)34TEST_FILE3_PATH = os.path.join(35 settings.BASE_DIR, 'apps', 'common', 'tests', 'contrib', TEST_FILENAME336)37TEST_TAR_BZ2_FILE_PATH = os.path.join(38 settings.BASE_DIR, 'apps', 'common', 'tests', 'contrib', TEST_TAR_BZ2_FILE39)40TEST_TAR_FILE_PATH = os.path.join(41 settings.BASE_DIR, 'apps', 'common', 'tests', 'contrib', TEST_TAR_FILE42)43TEST_TAR_GZ_FILE_PATH = os.path.join(44 settings.BASE_DIR, 'apps', 'common', 'tests', 'contrib', TEST_TAR_GZ_FILE45)46TEST_ZIP_FILE_PATH = os.path.join(47 settings.BASE_DIR, 'apps', 'common', 'tests', 'contrib', TEST_ZIP_FILE48)49TEST_SERVER_HOST = 'testserver'...

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:

YouTube

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

Run avocado 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?

Helpful

NotHelpful