def test_get_result(): dependencies = Dependencies(requirements) dependencies.dependencies() result = dependencies.get_result assert isinstance(result, dict)
def test_parse_xml(): dependencies = Dependencies(pom) root = dependencies.parse_xml(pom) root_test = eT.parse(pom) assert isinstance(root, type(root_test))
def test_get_version(): dependencies = Dependencies(requirements) dependencies.dependencies() version = dependencies.get_version('Flask-Migrate') assert '1.8.0' in version
def test_find_java_mvn(): dependencies = Dependencies(pom) dependencies.dependencies() assert 'pom-manipulation-io' in str(dependencies.get_result)
def test_find_python_pip(): dependencies = Dependencies(requirements) dependencies.dependencies() assert 'Flask' in str(dependencies.get_result)
def test_get_path(): dependencies = Dependencies(requirements) for root, dirs, filenames in os.walk(dependencies.directory): for filename in filenames: file_path = dependencies.get_path(root, filename) assert isinstance(file_path, list)
def test_find_file(): dependencies = Dependencies(requirements) file_path, flag = dependencies.find_file() assert isinstance(file_path, list) assert isinstance(flag, int)
def test_get_version(): dependencies = Dependencies(requirements) dependencies.dependencies() version = dependencies.get_version('Flask') assert version == '0.10.1'