def test_get_no_files_in_repo(self): # given dependabot = Dependabot(ANY, ANY) # when package_managers = dependabot.get_package_managers([]) # then assert package_managers == set([])
def test_get_gradle_package_manager(self): # given mock_content = {'name': 'build.gradle'} dependabot = Dependabot(ANY, ANY) # when package_managers = dependabot.get_package_managers([mock_content]) # then assert package_managers == set(['gradle'])
def test_get_maven_package_manager(self): # given mock_content = {'name': 'pom.xml'} dependabot = Dependabot(ANY, ANY) # when package_managers = dependabot.get_package_managers([mock_content]) # then assert package_managers == set(['maven'])
def test_get_package_managers(self): # given mock_content = {'name': 'Dockerfile'} dependabot = Dependabot(ANY, ANY) # when package_managers = dependabot.get_package_managers([mock_content]) # then assert package_managers == set(['docker'])
def test_get_multiple_package_managers(self): # given mock_dockerfile = {'name': 'Dockerfile'} mock_pipfile = {'name': 'Pipfile'} dependabot = Dependabot(ANY, ANY) # when package_managers = dependabot.get_package_managers( [mock_dockerfile, mock_pipfile]) # then assert package_managers == set(['docker', 'pip'])