def test_list_versions_badpackage(self, build_lb_image_for_env): """Test list_versions command""" mrg = PipPackageManager() lb = build_lb_image_for_env[0] username = build_lb_image_for_env[1] with pytest.raises(ValueError): mrg.list_versions("gigantumasdfasdfasdf", lb, username)
def test_list_versions(self, build_lb_image_for_env): """Test list_versions command""" mrg = PipPackageManager() lb = build_lb_image_for_env[0] username = build_lb_image_for_env[1] result = mrg.list_versions("gtmunit1", lb, username) assert len(result) == 5 assert result[0] == '0.12.4' assert result[1] == '0.2.4' assert result[2] == '0.2.1' assert result[3] == '0.2.0' assert result[4] == '0.1.0'