def test_filename_extractor_with_system_is_none(): filenames = [fake.linux_filename() for _ in range(3)] _paragraph = fake.paragraph_with_salt(filenames) extracted_filenames = extractors.filename(_paragraph, system=None) assert compare_2_list(filenames, extracted_filenames)
def test_filename_extractor_with_invalid_system(): filenames = [fake.linux_filename() for _ in range(3)] _paragraph = fake.paragraph_with_salt(filenames) with pytest.raises(ValueError): assert extractors.filename(_paragraph, system=fake.word())
def test_filename_validator_with_invalid_system(): value = fake.linux_filename() with pytest.raises(ValueError): assert validators.filename(value, system=fake.word())
def test_filename_validator_with_system_is_none(): value = fake.linux_filename() ret = validators.filename(value, system=None) assert ret
def test_linux_filename_with_filename_validator(): value = fake.linux_filename() ret = validators.filename(value, system='linux') assert ret