├── .gitignore ├── Dockerfile ├── Jenkinsfile ├── Readme.md ├── bin ├── build-webapp.sh ├── run-browsertest.sh └── run-securitytest.sh ├── cloud-formation ├── helloworld │ └── app │ │ ├── default-stack-policy.json │ │ ├── deploy-app.sh │ │ ├── main.yml │ │ └── stack.yml ├── jenkins │ └── app │ │ ├── bootstrap-jenkins.sh │ │ ├── default-stack-policy.json │ │ ├── etc-init.d-jenkins.sh │ │ ├── main.yml │ │ └── stack.yml ├── network │ ├── helloworld │ │ ├── default-stack-policy.json │ │ ├── main.yml │ │ └── stack.yml │ ├── jenkins │ │ ├── default-stack-policy.json │ │ ├── main.yml │ │ └── stack.yml │ └── shared │ │ ├── default-stack-policy.json │ │ ├── main.yml │ │ └── stack.yml └── security │ ├── helloworld │ ├── default-stack-policy.json │ ├── main.yml │ └── stack.yml │ ├── jenkins │ ├── default-stack-policy.json │ ├── main.yml │ └── stack.yml │ └── shared │ ├── default-stack-policy.json │ ├── main.yml │ └── stack.yml ├── doc ├── Install.md ├── images │ ├── HelloWorld-CloudFormation-Stacks.png │ ├── Jenkins-hello-world-development-branch-execution.png │ ├── Jenkins-hello-world-master-pause.png │ ├── Jenkins-hello-world-master.png │ ├── Jenkins-hello-world-multiple-branches.png │ ├── S3-Provisioning-Bucket-Structure.png │ ├── SonarQube-Example.png │ ├── ec2-key-pairs.png │ └── hello-world-webapp.png └── slack-integration.md └── webapp ├── pom.xml └── src ├── main ├── java │ └── com │ │ └── bah │ │ └── demos │ │ └── helloworld │ │ ├── WebApplication.java │ │ └── WelcomeController.java ├── resources │ ├── application.properties │ └── static │ │ └── main.css └── webapp │ └── WEB-INF │ └── jsp │ └── welcome.jsp └── test ├── java └── com │ └── bah │ └── demos │ └── helloworld │ └── WelcomeControllerTest.java ├── python ├── helloworld │ ├── HelloWorldTestBase.py │ ├── __init__.py │ ├── test_suite.py │ └── welcome │ │ └── test_WelcomePage.py └── webdriver │ ├── __init__.py │ └── browsertest │ ├── Bootstrap.py │ ├── BrowserTest.py │ ├── Container.py │ ├── Reporter.py │ ├── Result.py │ ├── TestSuite.py │ ├── __init__.py │ └── expected_conditions.py └── resources └── lib ├── .gitignore └── python2.6 └── site-packages ├── argparse-1.4.0-py2.6.egg-info ├── PKG-INFO ├── SOURCES.txt ├── dependency_links.txt ├── installed-files.txt └── top_level.txt ├── argparse.py ├── linecache2-1.0.0-py2.6.egg-info ├── PKG-INFO ├── SOURCES.txt ├── dependency_links.txt ├── installed-files.txt ├── not-zip-safe ├── pbr.json └── top_level.txt ├── linecache2 ├── __init__.py └── tests │ ├── __init__.py │ ├── inspect_fodder.py │ ├── inspect_fodder2.py │ ├── mapping_tests.py │ └── test_linecache.py ├── pbr-1.8.1-py2.6.egg-info ├── PKG-INFO ├── SOURCES.txt ├── dependency_links.txt ├── entry_points.txt ├── installed-files.txt ├── not-zip-safe └── top_level.txt ├── pbr ├── __init__.py ├── builddoc.py ├── cmd │ ├── __init__.py │ └── main.py ├── core.py ├── extra_files.py ├── find_package.py ├── git.py ├── hooks │ ├── __init__.py │ ├── backwards.py │ ├── base.py │ ├── commands.py │ ├── files.py │ └── metadata.py ├── options.py ├── packaging.py ├── pbr_json.py ├── testr_command.py ├── tests │ ├── __init__.py │ ├── base.py │ ├── test_commands.py │ ├── test_core.py │ ├── test_files.py │ ├── test_hooks.py │ ├── test_integration.py │ ├── test_packaging.py │ ├── test_setup.py │ ├── test_util.py │ ├── test_version.py │ ├── test_wsgi.py │ ├── testpackage │ │ ├── CHANGES.txt │ │ ├── LICENSE.txt │ │ ├── MANIFEST.in │ │ ├── README.txt │ │ ├── data_files │ │ │ ├── a.txt │ │ │ ├── b.txt │ │ │ └── c.rst │ │ ├── extra-file.txt │ │ ├── git-extra-file.txt │ │ ├── pbr_testpackage │ │ │ ├── __init__.py │ │ │ ├── _setup_hooks.py │ │ │ ├── cmd.py │ │ │ ├── extra.py │ │ │ ├── package_data │ │ │ │ ├── 1.txt │ │ │ │ └── 2.txt │ │ │ └── wsgi.py │ │ ├── setup.cfg │ │ ├── setup.py │ │ ├── src │ │ │ └── testext.c │ │ └── test-requirements.txt │ └── util.py ├── util.py └── version.py ├── requests-2.9.1-py2.6.egg-info ├── PKG-INFO ├── SOURCES.txt ├── dependency_links.txt ├── installed-files.txt ├── not-zip-safe ├── requires.txt └── top_level.txt ├── requests ├── __init__.py ├── adapters.py ├── api.py ├── auth.py ├── cacert.pem ├── certs.py ├── compat.py ├── cookies.py ├── exceptions.py ├── hooks.py ├── models.py ├── packages │ ├── __init__.py │ ├── chardet │ │ ├── __init__.py │ │ ├── big5freq.py │ │ ├── big5prober.py │ │ ├── chardetect.py │ │ ├── chardistribution.py │ │ ├── charsetgroupprober.py │ │ ├── charsetprober.py │ │ ├── codingstatemachine.py │ │ ├── compat.py │ │ ├── constants.py │ │ ├── cp949prober.py │ │ ├── escprober.py │ │ ├── escsm.py │ │ ├── eucjpprober.py │ │ ├── euckrfreq.py │ │ ├── euckrprober.py │ │ ├── euctwfreq.py │ │ ├── euctwprober.py │ │ ├── gb2312freq.py │ │ ├── gb2312prober.py │ │ ├── hebrewprober.py │ │ ├── jisfreq.py │ │ ├── jpcntx.py │ │ ├── langbulgarianmodel.py │ │ ├── langcyrillicmodel.py │ │ ├── langgreekmodel.py │ │ ├── langhebrewmodel.py │ │ ├── langhungarianmodel.py │ │ ├── langthaimodel.py │ │ ├── latin1prober.py │ │ ├── mbcharsetprober.py │ │ ├── mbcsgroupprober.py │ │ ├── mbcssm.py │ │ ├── sbcharsetprober.py │ │ ├── sbcsgroupprober.py │ │ ├── sjisprober.py │ │ ├── universaldetector.py │ │ └── utf8prober.py │ └── urllib3 │ │ ├── __init__.py │ │ ├── _collections.py │ │ ├── connection.py │ │ ├── connectionpool.py │ │ ├── contrib │ │ ├── __init__.py │ │ ├── appengine.py │ │ ├── ntlmpool.py │ │ └── pyopenssl.py │ │ ├── exceptions.py │ │ ├── fields.py │ │ ├── filepost.py │ │ ├── packages │ │ ├── __init__.py │ │ ├── ordered_dict.py │ │ ├── six.py │ │ └── ssl_match_hostname │ │ │ ├── __init__.py │ │ │ └── _implementation.py │ │ ├── poolmanager.py │ │ ├── request.py │ │ ├── response.py │ │ └── util │ │ ├── __init__.py │ │ ├── connection.py │ │ ├── request.py │ │ ├── response.py │ │ ├── retry.py │ │ ├── ssl_.py │ │ ├── timeout.py │ │ └── url.py ├── sessions.py ├── status_codes.py ├── structures.py └── utils.py ├── selenium-2.53.1-py2.6.egg-info ├── PKG-INFO ├── SOURCES.txt ├── dependency_links.txt ├── installed-files.txt ├── not-zip-safe ├── pbr.json └── top_level.txt ├── selenium-2.53.1.dist-info ├── DESCRIPTION.rst ├── INSTALLER ├── METADATA ├── RECORD ├── WHEEL ├── metadata.json ├── pbr.json └── top_level.txt ├── selenium ├── __init__.py ├── common │ ├── __init__.py │ └── exceptions.py ├── selenium.py └── webdriver │ ├── __init__.py │ ├── android │ ├── __init__.py │ └── webdriver.py │ ├── blackberry │ ├── __init__.py │ └── webdriver.py │ ├── chrome │ ├── __init__.py │ ├── options.py │ ├── remote_connection.py │ ├── service.py │ └── webdriver.py │ ├── common │ ├── __init__.py │ ├── action_chains.py │ ├── alert.py │ ├── by.py │ ├── desired_capabilities.py │ ├── html5 │ │ ├── __init__.py │ │ └── application_cache.py │ ├── keys.py │ ├── proxy.py │ ├── service.py │ ├── touch_actions.py │ └── utils.py │ ├── edge │ ├── __init__.py │ ├── options.py │ ├── service.py │ └── webdriver.py │ ├── firefox │ ├── __init__.py │ ├── amd64 │ │ └── x_ignore_nofocus.so │ ├── extension_connection.py │ ├── firefox_binary.py │ ├── firefox_profile.py │ ├── options.py │ ├── remote_connection.py │ ├── service.py │ ├── webdriver.py │ ├── webdriver.xpi │ ├── webdriver_prefs.json │ └── x86 │ │ └── x_ignore_nofocus.so │ ├── ie │ ├── __init__.py │ ├── service.py │ └── webdriver.py │ ├── opera │ ├── __init__.py │ ├── options.py │ └── webdriver.py │ ├── phantomjs │ ├── __init__.py │ ├── service.py │ └── webdriver.py │ ├── remote │ ├── __init__.py │ ├── command.py │ ├── errorhandler.py │ ├── file_detector.py │ ├── mobile.py │ ├── remote_connection.py │ ├── switch_to.py │ ├── utils.py │ ├── webdriver.py │ └── webelement.py │ ├── safari │ ├── __init__.py │ ├── service.py │ └── webdriver.py │ └── support │ ├── __init__.py │ ├── abstract_event_listener.py │ ├── color.py │ ├── event_firing_webdriver.py │ ├── events.py │ ├── expected_conditions.py │ ├── select.py │ ├── ui.py │ └── wait.py ├── site.py ├── six-1.10.0-py2.6.egg-info ├── PKG-INFO ├── SOURCES.txt ├── dependency_links.txt ├── installed-files.txt └── top_level.txt ├── traceback2-1.4.0-py2.6.egg-info ├── PKG-INFO ├── SOURCES.txt ├── dependency_links.txt ├── installed-files.txt ├── not-zip-safe ├── pbr.json ├── requires.txt └── top_level.txt ├── traceback2 ├── __init__.py └── tests │ ├── __init__.py │ └── test_traceback.py ├── unittest2-1.1.0-py2.6.egg-info ├── PKG-INFO ├── SOURCES.txt ├── dependency_links.txt ├── entry_points.txt ├── installed-files.txt ├── requires.txt └── top_level.txt ├── unittest2 ├── __init__.py ├── __main__.py ├── case.py ├── collector.py ├── compatibility.py ├── loader.py ├── main.py ├── result.py ├── runner.py ├── signals.py ├── suite.py ├── test │ ├── __init__.py │ ├── _test_unittest2_with.py │ ├── dummy.py │ ├── support.py │ ├── test_assertions.py │ ├── test_break.py │ ├── test_case.py │ ├── test_discovery.py │ ├── test_functiontestcase.py │ ├── test_loader.py │ ├── test_new_tests.py │ ├── test_program.py │ ├── test_result.py │ ├── test_runner.py │ ├── test_setups.py │ ├── test_skipping.py │ ├── test_suite.py │ └── test_unittest2_with.py └── util.py ├── urllib3-1.15.1.dist-info ├── DESCRIPTION.rst ├── INSTALLER ├── METADATA ├── RECORD ├── WHEEL ├── metadata.json ├── pbr.json └── top_level.txt ├── urllib3 ├── __init__.py ├── _collections.py ├── connection.py ├── connectionpool.py ├── contrib │ ├── __init__.py │ ├── appengine.py │ ├── ntlmpool.py │ ├── pyopenssl.py │ └── socks.py ├── exceptions.py ├── fields.py ├── filepost.py ├── packages │ ├── __init__.py │ ├── backports │ │ ├── __init__.py │ │ └── makefile.py │ ├── ordered_dict.py │ ├── six.py │ └── ssl_match_hostname │ │ ├── __init__.py │ │ └── _implementation.py ├── poolmanager.py ├── request.py ├── response.py └── util │ ├── __init__.py │ ├── connection.py │ ├── request.py │ ├── response.py │ ├── retry.py │ ├── ssl_.py │ ├── timeout.py │ └── url.py ├── xmlrunner-1.7.7-py2.6.egg-info ├── PKG-INFO ├── SOURCES.txt ├── dependency_links.txt ├── installed-files.txt ├── top_level.txt └── zip-safe └── xmlrunner ├── __init__.py ├── version.py └── xmlrunner.py /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | /webapp/src/test/python/TEST-*.xml 3 | /bin/bash.exe.stackdump 4 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM frolvlad/alpine-oraclejdk8:slim 2 | VOLUME /tmp 3 | ADD webapp/target/spring-boot-web-jsp-1.0.war app.war 4 | RUN sh -c 'touch /app.war' 5 | ENTRYPOINT ["java","-jar","/app.war"] -------------------------------------------------------------------------------- /bin/build-webapp.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | MAVEN_ARGS="$@" 4 | 5 | # https://hub.docker.com/_/maven/ 6 | MAVEN_IMAGE="maven:3.5.0-jdk-8-alpine" 7 | 8 | function get_parent { 9 | local script_dir=$(dirname $1) 10 | if [ "${script_dir}" == "." ]; then echo ".."; else echo "${script_dir}/.."; fi 11 | 12 | } 13 | 14 | function get_absolute_path { 15 | pushd "$1" > /dev/null; pwd; popd > /dev/null 16 | } 17 | 18 | REPO_DIR=$(get_parent $0) 19 | REPO_HOME=$(get_absolute_path "${REPO_DIR}") 20 | 21 | winpty docker run --name maven --rm \ 22 | --volume "/${REPO_HOME}/webapp:/project" \ 23 | "${MAVEN_IMAGE}" \ 24 | sh -c "cd /project; mvn ${MAVEN_ARGS} install" 25 | -------------------------------------------------------------------------------- /bin/run-browsertest.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | WEBSITE_URL="$1" 4 | 5 | if [ "${WEBSITE_URL}" == "" ]; then 6 | WEBSITE_URL="http:\/52.72.139.105" 7 | fi 8 | 9 | 10 | PYTHON_IMAGE="killercentury/python-phantomjs" 11 | 12 | function get_parent { 13 | local script_dir=$(dirname $1) 14 | if [ "${script_dir}" == "." ]; then echo ".."; else echo "${script_dir}/.."; fi 15 | } 16 | 17 | function get_absolute_path { 18 | pushd "$1" > /dev/null; pwd; popd > /dev/null 19 | } 20 | 21 | REPO_DIR=$(get_parent $0) 22 | REPO_HOME=$(get_absolute_path "${REPO_DIR}") 23 | 24 | WORKSPACE="\/project\/src\/test" 25 | RESULTS_DIR="\/project\/target\/browser-test-results" 26 | 27 | ARGS=() 28 | ARGS+=("--base-url=${WEBSITE_URL}") 29 | ARGS+=("--webdriver-class=PhantomJS") 30 | ARGS+=("--reuse-driver") 31 | ARGS+=("--default-wait=10") 32 | ARGS+=("--verbose") 33 | ARGS+=("--default-window-width=800") 34 | ARGS+=("--results-file=${RESULTS_DIR}/results.csv") 35 | ARGS+=("--test-reports-dir=${RESULTS_DIR}") 36 | 37 | CMD="export PYTHONPATH=${WORKSPACE}\/resources\/lib\/python2.6\/site-packages:${WORKSPACE}\/python" 38 | CMD="${CMD};mkdir -p ${RESULTS_DIR}" 39 | CMD="${CMD};python -B -u ${WORKSPACE}/python/helloworld/test_suite.py ${ARGS[@]}" 40 | 41 | winpty docker run --name browser-test --rm --volume "/${REPO_HOME}/webapp:/project" \ 42 | "${PYTHON_IMAGE}" sh -c "${CMD}" 43 | 44 | 45 | -------------------------------------------------------------------------------- /bin/run-securitytest.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | MAVEN_ARGS="$@" 4 | 5 | # https://hub.docker.com/_/maven/ 6 | MAVEN_IMAGE="maven:3.5.0-jdk-8-alpine" 7 | 8 | function get_parent { 9 | local script_dir=$(dirname $1) 10 | if [ "${script_dir}" == "." ]; then echo ".."; else echo "${script_dir}/.."; fi 11 | 12 | } 13 | 14 | function get_absolute_path { 15 | pushd "$1" > /dev/null; pwd; popd > /dev/null 16 | } 17 | 18 | function get_sonarqube_image_id { 19 | docker ps -all | awk -F" " ' /sonarqube/ {print $1;}' | tr -d '\n' 20 | } 21 | 22 | REPO_DIR=$(get_parent $0) 23 | REPO_HOME=$(get_absolute_path "${REPO_DIR}") 24 | 25 | SONAR_IMAGE_ID=$(get_sonarqube_image_id) 26 | if [ "${SONAR_IMAGE_ID}" == "" ]; then 27 | echo "Starting sonarqube daemon ..." 28 | SONAR_IMAGE_ID=$(docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube) 29 | fi 30 | echo "======================================================================" 31 | echo " Sonar daemon is running as Docker image ${SONAR_IMAGE_ID}" 32 | echo " Once done with testing you can stop and remove daemon using:" 33 | echo " docker stop ${SONAR_IMAGE_ID}" 34 | echo " docker rm ${SONAR_IMAGE_ID}" 35 | echo "======================================================================" 36 | 37 | winpty docker run --name maven --rm --net=host\ 38 | --volume "/${REPO_HOME}/webapp:/project" \ 39 | "${MAVEN_IMAGE}" \ 40 | sh -c "cd /project; mvn ${MAVEN_ARGS} sonar:sonar" 41 | -------------------------------------------------------------------------------- /cloud-formation/helloworld/app/default-stack-policy.json: -------------------------------------------------------------------------------- 1 | { 2 | "Statement": [ 3 | { 4 | "Effect": "Allow", 5 | "Action": "Update:*", 6 | "Principal": "*", 7 | "Resource": "*" 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /cloud-formation/helloworld/app/deploy-app.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | IMAGE="$1" 4 | REGISTRY_URL="$2" 5 | AWS_REGION="$3" 6 | 7 | if [ "${AWS_REGION}" == "" ]; then 8 | AWS_REGION="us-east-1" 9 | fi 10 | 11 | REGISTRY_URI=$(echo "${REGISTRY_URL}" | sed -e 's|^https://||g') 12 | IMAGE_NAME="${REGISTRY_URI}/${IMAGE}" 13 | 14 | SUCCESS= 15 | echo "Login to ${REGISTRY_URL}" 16 | LOGIN_COMMAND=$(/usr/local/bin/aws ecr get-login --region "${AWS_REGION}" | sed -e 's|-e none||g') 17 | $LOGIN_COMMAND 18 | 19 | echo "Pull ${IMAGE_NAME}" 20 | if docker pull "${IMAGE_NAME}" ; then 21 | CONTAINER=$(docker ps -all | tail -n +2 | grep 'webserver$') 22 | if [ "${CONTAINER}" != "" ] ; then 23 | docker stop webserver 24 | docker rm webserver 25 | fi 26 | if docker run -d -p 80:8080 --name webserver "${IMAGE_NAME}" ; then 27 | SUCCESS="yes" 28 | else 29 | echo "Failed to run ${IMAGE_NAME} image" >&2 30 | fi 31 | else 32 | echo "Failed to pull ${IMAGE_NAME} image" >&2 33 | fi 34 | 35 | echo "Logout from ${REGISTRY_URL}" 36 | docker logout "${REGISTRY_URL}" 37 | 38 | if [ "${SUCCESS}" == "" ]; then 39 | exit 1 40 | else 41 | echo "Successfully installed ${IMAGE_NAME}" >&2 42 | fi 43 | -------------------------------------------------------------------------------- /cloud-formation/helloworld/app/stack.yml: -------------------------------------------------------------------------------- 1 | stack: 2 | name: helloworld-app 3 | system-name: DSO 4 | master-template: main.yml 5 | parameters: 6 | System: {{env:SYSTEM_NAME}} 7 | Region: {{env:AWS_REGION:us-east-1}} 8 | Environment: {{env:ENVIRONMENT}} 9 | SecurityContext: {{env:SECURITY_CONTEXT}} 10 | ProvisioningBucket: {{env:BUCKET_NAME}} 11 | initializers: 12 | - deploy-app.sh 13 | -------------------------------------------------------------------------------- /cloud-formation/jenkins/app/bootstrap-jenkins.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | set -x 5 | 6 | JENKINS_DATA_HOME="/var/jenkins_home" 7 | JENKINS_USER="ec2-user" 8 | JENKINS_IMAGE="jenkins" 9 | 10 | # https://store.docker.com/editions/community/docker-ce-server-centos?tab=description 11 | echo "================ Installing docker ================" 12 | yum install -y yum-utils > /dev/null 13 | yum-config-manager --enable rhui-REGION-rhel-server-extras 14 | yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo 15 | yum makecache fast 16 | yum install -y docker-ce 17 | 18 | yum update -y 19 | 20 | echo "================ Setup docker service ================" 21 | chkconfig docker on 22 | service docker start 23 | 24 | echo "================ Run test container ================" 25 | docker run hello-world 26 | 27 | 28 | echo "================ Setup jenkins user ================" 29 | mkdir -p "${JENKINS_DATA_HOME}" 30 | chown -R "${JENKINS_USER}:${JENKINS_USER}" "${JENKINS_DATA_HOME}" 31 | usermod -a -G docker "${JENKINS_USER}" 32 | 33 | echo "================ Get jenkins container ================" 34 | docker pull "${JENKINS_IMAGE}" 35 | 36 | echo "================ Setup jenkins service ================" 37 | chkconfig jenkins on 38 | service jenkins start -------------------------------------------------------------------------------- /cloud-formation/jenkins/app/default-stack-policy.json: -------------------------------------------------------------------------------- 1 | { 2 | "Statement": [ 3 | { 4 | "Effect": "Allow", 5 | "Action": "Update:*", 6 | "Principal": "*", 7 | "Resource": "*" 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /cloud-formation/jenkins/app/stack.yml: -------------------------------------------------------------------------------- 1 | stack: 2 | name: jenkins-app 3 | system-name: DSO 4 | master-template: main.yml 5 | parameters: 6 | System: {{env:SYSTEM_NAME}} 7 | Region: {{env:AWS_REGION:us-east-1}} 8 | Environment: {{env:ENVIRONMENT:shared}} 9 | ProvisioningBucket: {{env:BUCKET_NAME}} 10 | initializers: 11 | - etc-init.d-jenkins.sh 12 | -------------------------------------------------------------------------------- /cloud-formation/network/helloworld/default-stack-policy.json: -------------------------------------------------------------------------------- 1 | { 2 | "Statement": [ 3 | { 4 | "Effect": "Allow", 5 | "Action": "Update:*", 6 | "Principal": "*", 7 | "Resource": "*" 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /cloud-formation/network/helloworld/main.yml: -------------------------------------------------------------------------------- 1 | AWSTemplateFormatVersion : '2010-09-09' 2 | Description: Hello World application network infrastructure for the DevSecOps example 3 | Parameters: 4 | System: 5 | Type: String 6 | Default: "DSO" 7 | Region: 8 | Type: String 9 | Default: "us-east-1" 10 | Environment: 11 | Type: String 12 | SharedEnvironment: 13 | Type: String 14 | Default: "shared" 15 | ApplicationCIDRBlock: 16 | Type: String 17 | Resources: 18 | LogGroup: 19 | Type: AWS::Logs::LogGroup 20 | DeletionPolicy: Delete 21 | Properties: 22 | LogGroupName: !Sub "${System}-${Environment}-helloworld" 23 | RetentionInDays: 14 24 | SubnetAZ1: 25 | Type: AWS::EC2::Subnet 26 | DeletionPolicy: Delete 27 | Properties: 28 | CidrBlock: !Ref ApplicationCIDRBlock 29 | VpcId: 30 | Fn::ImportValue: 31 | !Sub "${System}-${SharedEnvironment}-VPC" 32 | AvailabilityZone: 33 | Fn::ImportValue: 34 | !Sub "${System}-${SharedEnvironment}-AZ1" 35 | Tags: 36 | - Key: System 37 | Value: !Ref System 38 | - Key: Name 39 | Value: !Sub "${System}-${Environment}-helloworld" 40 | SubnetAZ1RouteTable: 41 | Type: AWS::EC2::SubnetRouteTableAssociation 42 | DeletionPolicy: Delete 43 | Properties: 44 | RouteTableId: 45 | Fn::ImportValue: 46 | !Sub "${System}-${SharedEnvironment}-PublicRouteTable" 47 | SubnetId: !Ref SubnetAZ1 48 | Outputs: 49 | SubnetAZ1: 50 | Value: !Ref SubnetAZ1 51 | Export: 52 | Name: !Sub "${System}-${Environment}-helloworld-SubnetAZ1" 53 | CIDRBlock: 54 | Value: !Ref ApplicationCIDRBlock 55 | Export: 56 | Name: !Sub "${System}-${Environment}-helloworld-CIDRBlock" 57 | AZ1: 58 | Value: !GetAtt SubnetAZ1.AvailabilityZone 59 | Export: 60 | Name: !Sub "${System}-${Environment}-helloworld-AZ1" 61 | -------------------------------------------------------------------------------- /cloud-formation/network/helloworld/stack.yml: -------------------------------------------------------------------------------- 1 | stack: 2 | name: helloworld-network 3 | system-name: DSO 4 | master-template: main.yml 5 | parameters: 6 | System: {{env:SYSTEM_NAME}} 7 | Region: {{env:AWS_REGION:us-east-1}} 8 | Environment: {{env:ENVIRONMENT}} 9 | ApplicationCIDRBlock: {{input:ApplicationCIDRBlock}} 10 | -------------------------------------------------------------------------------- /cloud-formation/network/jenkins/default-stack-policy.json: -------------------------------------------------------------------------------- 1 | { 2 | "Statement": [ 3 | { 4 | "Effect": "Allow", 5 | "Action": "Update:*", 6 | "Principal": "*", 7 | "Resource": "*" 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /cloud-formation/network/jenkins/main.yml: -------------------------------------------------------------------------------- 1 | AWSTemplateFormatVersion : '2010-09-09' 2 | Description: Jenkins network infrastructure for the DevSecOps example 3 | Parameters: 4 | System: 5 | Type: String 6 | Default: "DSO" 7 | Region: 8 | Type: String 9 | Default: "us-east-1" 10 | Environment: 11 | Type: String 12 | Default: "shared" 13 | JenkinsCIDRBlock: 14 | Type: String 15 | Default: "172.27.1.0/24" 16 | Resources: 17 | LogGroup: 18 | Type: AWS::Logs::LogGroup 19 | DeletionPolicy: Delete 20 | Properties: 21 | LogGroupName: !Sub "${System}-${Environment}-jenkins" 22 | RetentionInDays: 14 23 | SubnetAZ1: 24 | Type: AWS::EC2::Subnet 25 | DeletionPolicy: Delete 26 | Properties: 27 | CidrBlock: !Ref JenkinsCIDRBlock 28 | VpcId: 29 | Fn::ImportValue: 30 | !Sub "${System}-${Environment}-VPC" 31 | AvailabilityZone: 32 | Fn::ImportValue: 33 | !Sub "${System}-${Environment}-AZ1" 34 | Tags: 35 | - Key: System 36 | Value: !Ref System 37 | - Key: Name 38 | Value: !Sub "${System}-${Environment}-jenkins" 39 | SubnetAZ1RouteTable: 40 | Type: AWS::EC2::SubnetRouteTableAssociation 41 | DeletionPolicy: Delete 42 | Properties: 43 | RouteTableId: 44 | Fn::ImportValue: 45 | !Sub "${System}-${Environment}-PublicRouteTable" 46 | SubnetId: !Ref SubnetAZ1 47 | Outputs: 48 | SubnetAZ1: 49 | Value: !Ref SubnetAZ1 50 | Export: 51 | Name: !Sub "${System}-${Environment}-jenkins-SubnetAZ1" 52 | CIDRBlock: 53 | Value: !Ref JenkinsCIDRBlock 54 | Export: 55 | Name: !Sub "${System}-${Environment}-jenkins-CIDRBlock" 56 | AZ1: 57 | Value: !GetAtt SubnetAZ1.AvailabilityZone 58 | Export: 59 | Name: !Sub "${System}-${Environment}-jenkins-AZ1" 60 | -------------------------------------------------------------------------------- /cloud-formation/network/jenkins/stack.yml: -------------------------------------------------------------------------------- 1 | stack: 2 | name: jenkins-network 3 | system-name: DSO 4 | master-template: main.yml 5 | parameters: 6 | System: {{env:SYSTEM_NAME}} 7 | Region: {{env:AWS_REGION:us-east-1}} 8 | Environment: {{env:ENVIRONMENT}} 9 | JenkinsCIDRBlock: {{input:JenkinsCIDRBlock}} 10 | -------------------------------------------------------------------------------- /cloud-formation/network/shared/default-stack-policy.json: -------------------------------------------------------------------------------- 1 | { 2 | "Statement": [ 3 | { 4 | "Effect": "Allow", 5 | "Action": "Update:*", 6 | "Principal": "*", 7 | "Resource": "*" 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /cloud-formation/network/shared/main.yml: -------------------------------------------------------------------------------- 1 | AWSTemplateFormatVersion : '2010-09-09' 2 | Description: Shared network infrastructure for the DevSecOps example 3 | Parameters: 4 | System: 5 | Type: String 6 | Default: "DSO" 7 | Region: 8 | Type: String 9 | Default: "us-east-1" 10 | Environment: 11 | Type: String 12 | Default: "shared" 13 | VPCCIDRBlock: 14 | Type: String 15 | Default: "172.27.0.0/16" 16 | Resources: 17 | VPC: 18 | Type: AWS::EC2::VPC 19 | DeletionPolicy: Delete 20 | Properties: 21 | CidrBlock: !Ref VPCCIDRBlock 22 | InstanceTenancy: default 23 | EnableDnsSupport: 'true' 24 | EnableDnsHostnames: 'true' 25 | Tags: 26 | - Key: System 27 | Value: !Ref System 28 | - Key: Environment 29 | Value: "shared" 30 | - Key: Name 31 | Value: !Sub "${System}-${Environment}" 32 | IGW: 33 | Type: AWS::EC2::InternetGateway 34 | DeletionPolicy: Delete 35 | Properties: 36 | Tags: 37 | - Key: System 38 | Value: !Ref System 39 | - Key: Name 40 | Value: !Sub "${System}-${Environment}" 41 | VPCGatewayAttachment: 42 | Type: AWS::EC2::VPCGatewayAttachment 43 | DeletionPolicy: Delete 44 | Properties: 45 | VpcId: !Ref VPC 46 | InternetGatewayId: !Ref IGW 47 | PublicRouteTable: 48 | Type: AWS::EC2::RouteTable 49 | DeletionPolicy: Delete 50 | Properties: 51 | VpcId: !Ref VPC 52 | Tags: 53 | - Key: System 54 | Value: !Ref System 55 | - Key: Name 56 | Value: !Sub "${System}-${Environment}-public" 57 | PublicRoute: 58 | Type: AWS::EC2::Route 59 | DeletionPolicy: Delete 60 | DependsOn: VPCGatewayAttachment 61 | Properties: 62 | DestinationCidrBlock: "0.0.0.0/0" 63 | RouteTableId: !Ref PublicRouteTable 64 | GatewayId: !Ref IGW 65 | Outputs: 66 | VPC: 67 | Value: !Ref VPC 68 | Export: 69 | Name: !Sub "${System}-${Environment}-VPC" 70 | PublicRouteTable: 71 | Value: !Ref PublicRouteTable 72 | Export: 73 | Name: !Sub "${System}-${Environment}-PublicRouteTable" 74 | AZ1: 75 | Value: !Select ["1", "Fn::GetAZs": !Ref Region ] 76 | Export: 77 | Name: !Sub "${System}-${Environment}-AZ1" 78 | AZ2: 79 | Value: !Select ["2", "Fn::GetAZs": !Ref Region ] 80 | Export: 81 | Name: !Sub "${System}-${Environment}-AZ2" 82 | -------------------------------------------------------------------------------- /cloud-formation/network/shared/stack.yml: -------------------------------------------------------------------------------- 1 | stack: 2 | name: network 3 | system-name: USCIS-HL 4 | subsystem-name: shared 5 | master-template: main.yml 6 | parameters: 7 | System: {{env:SYSTEM_NAME}} 8 | Region: {{env:AWS_REGION:us-east-1}} 9 | VPCCIDRBlock: {{input:VPCCIDRBlock}} 10 | -------------------------------------------------------------------------------- /cloud-formation/security/helloworld/default-stack-policy.json: -------------------------------------------------------------------------------- 1 | { 2 | "Statement": [ 3 | { 4 | "Effect": "Allow", 5 | "Action": "Update:*", 6 | "Principal": "*", 7 | "Resource": "*" 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /cloud-formation/security/helloworld/stack.yml: -------------------------------------------------------------------------------- 1 | stack: 2 | name: helloworld-security 3 | system-name: DSO 4 | master-template: main.yml 5 | parameters: 6 | System: {{env:SYSTEM_NAME}} 7 | Environment: {{env:ENVIRONMENT}} 8 | Region: {{env:AWS_REGION}} 9 | ProvisioningBucket: {{env:BUCKET_NAME}} 10 | ProvisioningBucketPath: cloud-formation 11 | VPCCIDRBlock: {{input:VPCCIDRBlock}} 12 | PrivilegedCIDR1: {{input:PrivilegedCIDR1}} 13 | PrivilegedCIDR2: {{input:PrivilegedCIDR2}} 14 | PrivilegedCIDR3: {{input:PrivilegedCIDR3}} 15 | PrivilegedCIDR4: {{input:PrivilegedCIDR4}} 16 | PrivilegedCIDR5: {{input:PrivilegedCIDR5}} -------------------------------------------------------------------------------- /cloud-formation/security/jenkins/default-stack-policy.json: -------------------------------------------------------------------------------- 1 | { 2 | "Statement": [ 3 | { 4 | "Effect": "Allow", 5 | "Action": "Update:*", 6 | "Principal": "*", 7 | "Resource": "*" 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /cloud-formation/security/jenkins/stack.yml: -------------------------------------------------------------------------------- 1 | stack: 2 | name: jenkins-security 3 | system-name: DSO 4 | master-template: main.yml 5 | parameters: 6 | System: {{env:SYSTEM_NAME}} 7 | Environment: {{env:ENVIRONMENT}} 8 | Region: {{env:AWS_REGION}} 9 | ProvisioningBucket: {{env:BUCKET_NAME}} 10 | ProvisioningBucketPath: {{env:STACK_PREFIX}} 11 | VPCCIDRBlock: {{input:VPCCIDRBlock}} 12 | PrivilegedCIDR1: {{input:PrivilegedCIDR1}} 13 | PrivilegedCIDR2: {{input:PrivilegedCIDR2}} 14 | PrivilegedCIDR3: {{input:PrivilegedCIDR3}} 15 | PrivilegedCIDR4: {{input:PrivilegedCIDR4}} 16 | PrivilegedCIDR5: {{input:PrivilegedCIDR5}} -------------------------------------------------------------------------------- /cloud-formation/security/shared/default-stack-policy.json: -------------------------------------------------------------------------------- 1 | { 2 | "Statement": [ 3 | { 4 | "Effect": "Allow", 5 | "Action": "Update:*", 6 | "Principal": "*", 7 | "Resource": "*" 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /cloud-formation/security/shared/stack.yml: -------------------------------------------------------------------------------- 1 | stack: 2 | name: security 3 | system-name: USCIS-HW 4 | master-template: main.yml 5 | parameters: 6 | System: {{env:SYSTEM_NAME}} 7 | Region: {{env:AWS_REGION}} 8 | PrivilegedCIDR1: {{input:PrivilegedCIDR1}} 9 | PrivilegedCIDR2: {{input:PrivilegedCIDR2}} 10 | PrivilegedCIDR3: {{input:PrivilegedCIDR3}} 11 | PrivilegedCIDR4: {{input:PrivilegedCIDR4}} 12 | PrivilegedCIDR5: {{input:PrivilegedCIDR5}} -------------------------------------------------------------------------------- /doc/images/HelloWorld-CloudFormation-Stacks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/doc/images/HelloWorld-CloudFormation-Stacks.png -------------------------------------------------------------------------------- /doc/images/Jenkins-hello-world-development-branch-execution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/doc/images/Jenkins-hello-world-development-branch-execution.png -------------------------------------------------------------------------------- /doc/images/Jenkins-hello-world-master-pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/doc/images/Jenkins-hello-world-master-pause.png -------------------------------------------------------------------------------- /doc/images/Jenkins-hello-world-master.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/doc/images/Jenkins-hello-world-master.png -------------------------------------------------------------------------------- /doc/images/Jenkins-hello-world-multiple-branches.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/doc/images/Jenkins-hello-world-multiple-branches.png -------------------------------------------------------------------------------- /doc/images/S3-Provisioning-Bucket-Structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/doc/images/S3-Provisioning-Bucket-Structure.png -------------------------------------------------------------------------------- /doc/images/SonarQube-Example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/doc/images/SonarQube-Example.png -------------------------------------------------------------------------------- /doc/images/ec2-key-pairs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/doc/images/ec2-key-pairs.png -------------------------------------------------------------------------------- /doc/images/hello-world-webapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/doc/images/hello-world-webapp.png -------------------------------------------------------------------------------- /doc/slack-integration.md: -------------------------------------------------------------------------------- 1 | # Jenkins-Slack Integration 2 | 3 | Jenkins can easily be integrated with Slack using the built-in `slackSend` command. 4 | 5 | E.g. to add a notification to the end of the pipeline: 6 | ``` 7 | post { 8 | failure { 9 | slackSend color: "warning", message: "${env.SLACK_JOB_REFERENCE} failed" 10 | } 11 | success { 12 | slackSend color: "good", message: "${env.SLACK_JOB_REFERENCE} succeeded" 13 | } 14 | } 15 | ``` 16 | 17 | 18 | This could be combined with some additional code to build slack messages, e.g. adding @mentions 19 | of the github change author: 20 | 21 | ``` 22 | def prepareSlack() { 23 | def jobName = env.JOB_NAME.replace('%2F', '/') 24 | def mention = getSlackMention(getGitAuthor()) 25 | env.SLACK_JOB_REFERENCE = ((mention) ? "${mention} " : "") + 26 | "${jobName}: Build ${env.BUILD_NUMBER}" 27 | } 28 | 29 | def getGitAuthor() { 30 | return sh(script: "git show --name-only | awk '/^Author:/ {print \$2;}' | tr '\n' ' '", 31 | returnStdout: true).trim() 32 | } 33 | 34 | def getSlackMention(author) { 35 | if (env.SLACK_USER_MAPPING == "") { 36 | echo "Environment variable 'SLACK_USER_MAPPING' not defined" 37 | return "" 38 | } 39 | echo "Getting ${author} from ${env.SLACK_USER_MAPPING}" 40 | def slurper = new JsonSlurper() 41 | def mapping = slurper.parseText(env.SLACK_USER_MAPPING) 42 | def slackUser = mapping[author] 43 | echo "slackUser=${slackUser}" 44 | return (slackUser) ? "@${slackUser}" : "" 45 | } 46 | ``` 47 | 48 | This assume a global environment variable (`SLACK_USER_MAPPING`) to be defined in Jenkins 49 | to define a github to slack user mapping, assuming usernames do not match. 50 | ``` 51 | SLACK_USER_MAPPING="{\"my-github-user-name\": \"my-slack-user-name\"}" 52 | ``` -------------------------------------------------------------------------------- /webapp/src/main/java/com/bah/demos/helloworld/WebApplication.java: -------------------------------------------------------------------------------- 1 | package com.bah.demos.helloworld; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.boot.builder.SpringApplicationBuilder; 6 | import org.springframework.boot.web.support.SpringBootServletInitializer; 7 | 8 | @SpringBootApplication 9 | public class WebApplication extends SpringBootServletInitializer { 10 | 11 | @Override 12 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { 13 | return application.sources(WebApplication.class); 14 | } 15 | 16 | public static void main(String[] args) throws Exception { 17 | SpringApplication.run(WebApplication.class, args); 18 | } 19 | } -------------------------------------------------------------------------------- /webapp/src/main/java/com/bah/demos/helloworld/WelcomeController.java: -------------------------------------------------------------------------------- 1 | package com.bah.demos.helloworld; 2 | 3 | import java.util.Map; 4 | 5 | import org.springframework.beans.factory.annotation.Value; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | 9 | @Controller 10 | public class WelcomeController { 11 | 12 | public static final String MESSAGE = "Hello World"; 13 | 14 | // inject via application.properties 15 | @Value("${welcome.message:test}") 16 | private String message = MESSAGE; 17 | 18 | @RequestMapping("/") 19 | public String welcome(Map model) { 20 | model.put("message", this.message); 21 | return "welcome"; 22 | } 23 | } -------------------------------------------------------------------------------- /webapp/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.mvc.view.prefix: /WEB-INF/jsp/ 2 | spring.mvc.view.suffix: .jsp 3 | 4 | welcome.message: Hello World -------------------------------------------------------------------------------- /webapp/src/main/resources/static/main.css: -------------------------------------------------------------------------------- 1 | h1{ color:#112E60; } 2 | div.container {background-color: #112E60;} -------------------------------------------------------------------------------- /webapp/src/main/webapp/WEB-INF/jsp/welcome.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> 3 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 4 | 5 | 6 | 7 | 9 | 10 | 11 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 36 | 37 |
38 |
39 |

${message}

40 |
41 |
42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /webapp/src/test/java/com/bah/demos/helloworld/WelcomeControllerTest.java: -------------------------------------------------------------------------------- 1 | package com.bah.demos.helloworld; 2 | 3 | import org.junit.Test; 4 | import org.junit.Assert; 5 | 6 | import java.util.Map; 7 | import java.util.HashMap; 8 | 9 | public class WelcomeControllerTest { 10 | 11 | @Test 12 | public void welcomeMessageMatchedDefault() { 13 | final Map model = new HashMap(); 14 | final WelcomeController controller = new WelcomeController(); 15 | Assert.assertEquals("welcome", controller.welcome(model)); 16 | Assert.assertEquals(WelcomeController.MESSAGE, model.get("message")); 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /webapp/src/test/python/helloworld/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/webapp/src/test/python/helloworld/__init__.py -------------------------------------------------------------------------------- /webapp/src/test/python/helloworld/test_suite.py: -------------------------------------------------------------------------------- 1 | from helloworld.HelloWorldTestBase import HelloWorldTestBase 2 | 3 | if __name__ == "__main__": 4 | HelloWorldTestBase.runTestSuite() 5 | -------------------------------------------------------------------------------- /webapp/src/test/python/helloworld/welcome/test_WelcomePage.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from helloworld.HelloWorldTestBase import HelloWorldTestBase 4 | from selenium.webdriver.common.by import By 5 | 6 | class test_WelcomePage(HelloWorldTestBase): 7 | 8 | def testWelcomeMessage(self): 9 | self.assertTextPresent(By.CSS_SELECTOR, "h1", "Hello World"); 10 | 11 | if __name__ == "__main__": 12 | HelloWorldTestBase.runTestCase(test_WelcomePage) -------------------------------------------------------------------------------- /webapp/src/test/python/webdriver/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/webapp/src/test/python/webdriver/__init__.py -------------------------------------------------------------------------------- /webapp/src/test/python/webdriver/browsertest/Bootstrap.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Aug 24, 2016 3 | 4 | @author: rob.proper 5 | ''' 6 | 7 | import os.path, sys 8 | 9 | class Bootstrap: 10 | 11 | @staticmethod 12 | def loadModulesFromPath(pathName): 13 | Bootstrap.convertArgumentsToVariables([pathName]) 14 | path = Bootstrap.getVariable(pathName) 15 | if not path: 16 | Bootstrap.verbose("Environment variable '{0}' not found".format(pathName)) 17 | return 18 | paths = path.split(os.pathsep) 19 | for dirname in paths: 20 | Bootstrap.verbose("Checking {0} for modules".format(dirname)) 21 | for name in os.listdir(dirname): 22 | if name != 'browsertest' and os.path.isdir(dirname + os.sep + name): 23 | package_path = dirname + os.sep + name 24 | #if os.path.isfile(package_path + os.sep + "setup.py"): 25 | if package_path in sys.path: 26 | #print "Module {0} already on path".format(name) 27 | pass 28 | else: 29 | Bootstrap.verbose("Adding module {1} from {0}".format(package_path, name)) 30 | sys.path.append(package_path) 31 | else: 32 | Bootstrap.verbose("Skipping {0}".format(name)) 33 | 34 | @staticmethod 35 | def getVariable(name): 36 | return os.getenv(Bootstrap.convertArgumentToVariableName(name)) 37 | 38 | @staticmethod 39 | def convertArgumentsToVariables(names): 40 | for arg in sys.argv: 41 | for name in names: 42 | Bootstrap.argToEnv(arg, name) 43 | 44 | @staticmethod 45 | def argToEnv(arg, name): 46 | prefix = "--" + name 47 | if not arg or not arg.startswith(prefix): 48 | return 49 | 50 | prefix = prefix + "=" 51 | if arg.startswith(prefix): 52 | value = arg.replace(prefix, "") 53 | else: 54 | value = "TRUE" 55 | 56 | variable = Bootstrap.convertArgumentToVariableName(name) 57 | Bootstrap.verbose("set environment variable {0} to '{1}'".format(variable, value)) 58 | os.environ[variable] = value 59 | return value 60 | 61 | @staticmethod 62 | def convertArgumentToVariableName(name): 63 | prefix = "--" 64 | if name.startswith(prefix): 65 | name.replace(prefix, "") 66 | name = name.replace("-", "_") 67 | name = name.upper() 68 | return name 69 | 70 | @staticmethod 71 | def verbose(text): 72 | isVerbose = os.getenv("VERBOSE_BOOTSTRAP") 73 | if isVerbose: 74 | print(text) 75 | -------------------------------------------------------------------------------- /webapp/src/test/python/webdriver/browsertest/Result.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Created on Aug 24, 2016 3 | 4 | @author: rob.proper 5 | ''' 6 | 7 | class Result: 8 | 9 | PASS = 'pass' 10 | ERROR = 'error' 11 | FAILURE = 'failure' 12 | 13 | @staticmethod 14 | def convert(result, numberOfErrors = 0, numberOfFailures = 0): 15 | if not result or (len(result.errors) > numberOfErrors): 16 | return Result.ERROR 17 | elif len(result.failures) > numberOfFailures: 18 | return Result.FAILURE 19 | else: 20 | return Result.PASS -------------------------------------------------------------------------------- /webapp/src/test/python/webdriver/browsertest/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from webdriver.browsertest.Bootstrap import Bootstrap 3 | 4 | Bootstrap.loadModulesFromPath('modules-path') 5 | 6 | from webdriver.browsertest.expected_conditions import ElementHasText 7 | from webdriver.browsertest.expected_conditions import HasLocation 8 | from webdriver.browsertest import BrowserTest 9 | from webdriver.browsertest import TestSuite 10 | from webdriver.browsertest import Container 11 | 12 | -------------------------------------------------------------------------------- /webapp/src/test/python/webdriver/browsertest/expected_conditions.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import re 4 | 5 | from selenium.common.exceptions import NoSuchElementException 6 | from selenium.common.exceptions import StaleElementReferenceException 7 | from selenium.common.exceptions import WebDriverException 8 | 9 | class ElementHasText(object): 10 | """An expectation for checking the the text of an element denoted by the locator. 11 | locator is the locator 12 | text is the expected text 13 | returns True if the text matches, false otherwise.""" 14 | def __init__(self, locator, text, ignoreCase = True): 15 | self.locator = locator 16 | self.ignoreCase = ignoreCase 17 | self.expected = self.setCase(text if type(text) is str else text.encode('unicode-escape')) 18 | 19 | def __call__(self, driver): 20 | try: 21 | actual = _find_element(driver, self.locator).text 22 | if not type(actual) is str: 23 | actual = actual.encode('unicode-escape') 24 | actual = self.setCase(actual) 25 | #print "Comparing '{0}' and '{1}'".format(actual, self.expected) 26 | return actual == self.expected 27 | except StaleElementReferenceException: 28 | return False 29 | 30 | def setCase(self, text): 31 | return text.lower() if text and self.ignoreCase else text 32 | 33 | 34 | 35 | class HasLocation(object): 36 | """An expectation for checking the current URL. 37 | url is the expected location. Must be a string or a regular expression 38 | returns True if the current URL matches 'rul', false otherwise.""" 39 | def __init__(self, url): 40 | if not type(url) is list: 41 | url = [ url ] 42 | self.expected = [] 43 | for u in url: 44 | self.expected.append(re.compile(u) if type(u) is str else u) 45 | 46 | def __call__(self, driver): 47 | return (self.matches(driver.current_url)) 48 | 49 | def matches(self, actual): 50 | #print "===== matching {0} to {1}".format(actual, self.expected) 51 | if not actual: 52 | actual = "" 53 | elif not type(actual): 54 | actual = str(actual) 55 | for e in self.expected: 56 | if e.match(actual): 57 | return True 58 | else: 59 | return False 60 | 61 | 62 | 63 | def _find_element(driver, by): 64 | """Looks up an element. Logs and re-raises ``WebDriverException`` 65 | if thrown.""" 66 | try : 67 | return driver.find_element(*by) 68 | except NoSuchElementException as e: 69 | raise e 70 | except WebDriverException as e: 71 | raise e 72 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/argparse-1.4.0-py2.6.egg-info/SOURCES.txt: -------------------------------------------------------------------------------- 1 | LICENSE.txt 2 | MANIFEST.in 3 | NEWS.txt 4 | README.txt 5 | argparse.py 6 | setup.cfg 7 | setup.py 8 | argparse.egg-info/PKG-INFO 9 | argparse.egg-info/SOURCES.txt 10 | argparse.egg-info/dependency_links.txt 11 | argparse.egg-info/top_level.txt 12 | doc/Makefile 13 | doc/make.bat 14 | doc/source/Python-License.txt 15 | doc/source/argparse.rst 16 | doc/source/conf.py 17 | doc/source/index.rst 18 | doc/source/license.rst 19 | test/test_argparse.py -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/argparse-1.4.0-py2.6.egg-info/dependency_links.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/argparse-1.4.0-py2.6.egg-info/installed-files.txt: -------------------------------------------------------------------------------- 1 | ../argparse.py 2 | ../argparse.pyc 3 | . 4 | SOURCES.txt 5 | top_level.txt 6 | dependency_links.txt 7 | PKG-INFO 8 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/argparse-1.4.0-py2.6.egg-info/top_level.txt: -------------------------------------------------------------------------------- 1 | argparse 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/linecache2-1.0.0-py2.6.egg-info/PKG-INFO: -------------------------------------------------------------------------------- 1 | Metadata-Version: 1.0 2 | Name: linecache2 3 | Version: 1.0.0 4 | Summary: Backports of the linecache module 5 | Home-page: https://github.com/testing-cabal/linecache2 6 | Author: Testing-cabal 7 | Author-email: testing-cabal@lists.launchpad.net 8 | License: UNKNOWN 9 | Description: A backport of linecache to older supported Pythons. 10 | 11 | >>> import linecache2 as linecache 12 | 13 | Profit. 14 | 15 | 16 | Platform: UNKNOWN 17 | Classifier: Development Status :: 6 - Mature 18 | Classifier: Intended Audience :: Developers 19 | Classifier: License :: OSI Approved :: Python Software Foundation License 20 | Classifier: Operating System :: OS Independent 21 | Classifier: Programming Language :: Python 22 | Classifier: Programming Language :: Python :: 2 23 | Classifier: Programming Language :: Python :: 2.6 24 | Classifier: Programming Language :: Python :: 2.7 25 | Classifier: Programming Language :: Python :: 3 26 | Classifier: Programming Language :: Python :: 3.2 27 | Classifier: Programming Language :: Python :: 3.3 28 | Classifier: Programming Language :: Python :: 3.4 29 | Classifier: Topic :: Software Development 30 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/linecache2-1.0.0-py2.6.egg-info/SOURCES.txt: -------------------------------------------------------------------------------- 1 | .testr.conf 2 | AUTHORS 3 | ChangeLog 4 | Makefile 5 | README.rst 6 | requirements.txt 7 | setup.cfg 8 | setup.py 9 | test-requirements.txt 10 | update.sh 11 | linecache2/__init__.py 12 | linecache2.egg-info/PKG-INFO 13 | linecache2.egg-info/SOURCES.txt 14 | linecache2.egg-info/dependency_links.txt 15 | linecache2.egg-info/not-zip-safe 16 | linecache2.egg-info/pbr.json 17 | linecache2.egg-info/top_level.txt 18 | linecache2/tests/__init__.py 19 | linecache2/tests/inspect_fodder.py 20 | linecache2/tests/inspect_fodder2.py 21 | linecache2/tests/mapping_tests.py 22 | linecache2/tests/test_linecache.py -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/linecache2-1.0.0-py2.6.egg-info/dependency_links.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/linecache2-1.0.0-py2.6.egg-info/installed-files.txt: -------------------------------------------------------------------------------- 1 | ../linecache2/__init__.py 2 | ../linecache2/tests/mapping_tests.py 3 | ../linecache2/tests/inspect_fodder2.py 4 | ../linecache2/tests/inspect_fodder.py 5 | ../linecache2/tests/test_linecache.py 6 | ../linecache2/tests/__init__.py 7 | ../linecache2/__init__.pyc 8 | ../linecache2/tests/mapping_tests.pyc 9 | ../linecache2/tests/inspect_fodder2.pyc 10 | ../linecache2/tests/inspect_fodder.pyc 11 | ../linecache2/tests/test_linecache.pyc 12 | ../linecache2/tests/__init__.pyc 13 | . 14 | pbr.json 15 | SOURCES.txt 16 | top_level.txt 17 | dependency_links.txt 18 | not-zip-safe 19 | PKG-INFO 20 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/linecache2-1.0.0-py2.6.egg-info/not-zip-safe: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/linecache2-1.0.0-py2.6.egg-info/pbr.json: -------------------------------------------------------------------------------- 1 | {"git_version": "bf7c1f5", "is_release": true} -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/linecache2-1.0.0-py2.6.egg-info/top_level.txt: -------------------------------------------------------------------------------- 1 | linecache2 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/linecache2/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/webapp/src/test/resources/lib/python2.6/site-packages/linecache2/tests/__init__.py -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/linecache2/tests/inspect_fodder.py: -------------------------------------------------------------------------------- 1 | # line 1 2 | 'A module docstring.' 3 | 4 | import sys, inspect 5 | # line 5 6 | 7 | # line 7 8 | def spam(a, b, c, d=3, e=4, f=5, *g, **h): 9 | eggs(b + d, c + f) 10 | 11 | # line 11 12 | def eggs(x, y): 13 | "A docstring." 14 | global fr, st 15 | fr = inspect.currentframe() 16 | st = inspect.stack() 17 | p = x 18 | q = y / 0 19 | 20 | # line 20 21 | class StupidGit: 22 | """A longer, 23 | 24 | indented 25 | 26 | docstring.""" 27 | # line 27 28 | 29 | def abuse(self, a, b, c): 30 | """Another 31 | 32 | \tdocstring 33 | 34 | containing 35 | 36 | \ttabs 37 | \t 38 | """ 39 | self.argue(a, b, c) 40 | # line 40 41 | def argue(self, a, b, c): 42 | try: 43 | spam(a, b, c) 44 | except: 45 | self.ex = sys.exc_info() 46 | self.tr = inspect.trace() 47 | 48 | # line 48 49 | class MalodorousPervert(StupidGit): 50 | pass 51 | 52 | Tit = MalodorousPervert 53 | 54 | class ParrotDroppings: 55 | pass 56 | 57 | class FesteringGob(MalodorousPervert, ParrotDroppings): 58 | pass 59 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/linecache2/tests/inspect_fodder2.py: -------------------------------------------------------------------------------- 1 | # line 1 2 | def wrap(foo=None): 3 | def wrapper(func): 4 | return func 5 | return wrapper 6 | 7 | # line 7 8 | def replace(func): 9 | def insteadfunc(): 10 | print('hello') 11 | return insteadfunc 12 | 13 | # line 13 14 | @wrap() 15 | @wrap(wrap) 16 | def wrapped(): 17 | pass 18 | 19 | # line 19 20 | @replace 21 | def gone(): 22 | pass 23 | 24 | # line 24 25 | oll = lambda m: m 26 | 27 | # line 27 28 | tll = lambda g: g and \ 29 | g and \ 30 | g 31 | 32 | # line 32 33 | tlli = lambda d: d and \ 34 | d 35 | 36 | # line 36 37 | def onelinefunc(): pass 38 | 39 | # line 39 40 | def manyargs(arg1, arg2, 41 | arg3, arg4): pass 42 | 43 | # line 43 44 | def twolinefunc(m): return m and \ 45 | m 46 | 47 | # line 47 48 | a = [None, 49 | lambda x: x, 50 | None] 51 | 52 | # line 52 53 | def setfunc(func): 54 | globals()["anonymous"] = func 55 | setfunc(lambda x, y: x*y) 56 | 57 | # line 57 58 | def with_comment(): # hello 59 | world 60 | 61 | # line 61 62 | multiline_sig = [ 63 | lambda x, \ 64 | y: x+y, 65 | None, 66 | ] 67 | 68 | # line 68 69 | def func69(): 70 | class cls70: 71 | def func71(): 72 | pass 73 | return cls70 74 | extra74 = 74 75 | 76 | # line 76 77 | def func77(): pass 78 | (extra78, stuff78) = 'xy' 79 | extra79 = 'stop' 80 | 81 | # line 81 82 | class cls82: 83 | def func83(): pass 84 | (extra84, stuff84) = 'xy' 85 | extra85 = 'stop' 86 | 87 | # line 87 88 | def func88(): 89 | # comment 90 | return 90 91 | 92 | # line 92 93 | def f(): 94 | class X: 95 | def g(): 96 | "doc" 97 | return 42 98 | return X 99 | method_in_dynamic_class = f().g 100 | 101 | #line 101 102 | def keyworded(*arg1, arg2=1): 103 | pass 104 | 105 | #line 105 106 | def annotated(arg1: list): 107 | pass 108 | 109 | #line 109 110 | def keyword_only_arg(*, arg): 111 | pass 112 | 113 | from functools import wraps 114 | 115 | def decorator(func): 116 | @wraps(func) 117 | def fake(): 118 | return 42 119 | return fake 120 | 121 | #line 121 122 | @decorator 123 | def real(): 124 | return 20 125 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr-1.8.1-py2.6.egg-info/SOURCES.txt: -------------------------------------------------------------------------------- 1 | .coveragerc 2 | .mailmap 3 | .testr.conf 4 | AUTHORS 5 | CONTRIBUTING.rst 6 | ChangeLog 7 | LICENSE 8 | MANIFEST.in 9 | README.rst 10 | setup.cfg 11 | setup.py 12 | test-requirements.txt 13 | tox.ini 14 | doc/source/conf.py 15 | doc/source/index.rst 16 | doc/source/packagers.rst 17 | doc/source/semver.rst 18 | doc/source/testing.rst 19 | doc/source/_templates/.placeholder 20 | doc/source/_theme/layout.html 21 | doc/source/_theme/theme.conf 22 | doc/source/static/basic.css 23 | doc/source/static/default.css 24 | doc/source/static/header-line.gif 25 | doc/source/static/header_bg.jpg 26 | doc/source/static/jquery.tweet.js 27 | doc/source/static/nature.css 28 | doc/source/static/openstack_logo.png 29 | doc/source/static/tweaks.css 30 | pbr/__init__.py 31 | pbr/builddoc.py 32 | pbr/core.py 33 | pbr/extra_files.py 34 | pbr/find_package.py 35 | pbr/git.py 36 | pbr/options.py 37 | pbr/packaging.py 38 | pbr/pbr_json.py 39 | pbr/testr_command.py 40 | pbr/util.py 41 | pbr/version.py 42 | pbr.egg-info/PKG-INFO 43 | pbr.egg-info/SOURCES.txt 44 | pbr.egg-info/dependency_links.txt 45 | pbr.egg-info/entry_points.txt 46 | pbr.egg-info/not-zip-safe 47 | pbr.egg-info/top_level.txt 48 | pbr/cmd/__init__.py 49 | pbr/cmd/main.py 50 | pbr/hooks/__init__.py 51 | pbr/hooks/backwards.py 52 | pbr/hooks/base.py 53 | pbr/hooks/commands.py 54 | pbr/hooks/files.py 55 | pbr/hooks/metadata.py 56 | pbr/tests/__init__.py 57 | pbr/tests/base.py 58 | pbr/tests/test_commands.py 59 | pbr/tests/test_core.py 60 | pbr/tests/test_files.py 61 | pbr/tests/test_hooks.py 62 | pbr/tests/test_integration.py 63 | pbr/tests/test_packaging.py 64 | pbr/tests/test_setup.py 65 | pbr/tests/test_util.py 66 | pbr/tests/test_version.py 67 | pbr/tests/test_wsgi.py 68 | pbr/tests/util.py 69 | pbr/tests/testpackage/CHANGES.txt 70 | pbr/tests/testpackage/LICENSE.txt 71 | pbr/tests/testpackage/MANIFEST.in 72 | pbr/tests/testpackage/README.txt 73 | pbr/tests/testpackage/extra-file.txt 74 | pbr/tests/testpackage/git-extra-file.txt 75 | pbr/tests/testpackage/setup.cfg 76 | pbr/tests/testpackage/setup.py 77 | pbr/tests/testpackage/test-requirements.txt 78 | pbr/tests/testpackage/data_files/a.txt 79 | pbr/tests/testpackage/data_files/b.txt 80 | pbr/tests/testpackage/data_files/c.rst 81 | pbr/tests/testpackage/pbr_testpackage/__init__.py 82 | pbr/tests/testpackage/pbr_testpackage/_setup_hooks.py 83 | pbr/tests/testpackage/pbr_testpackage/cmd.py 84 | pbr/tests/testpackage/pbr_testpackage/extra.py 85 | pbr/tests/testpackage/pbr_testpackage/wsgi.py 86 | pbr/tests/testpackage/pbr_testpackage/package_data/1.txt 87 | pbr/tests/testpackage/pbr_testpackage/package_data/2.txt 88 | pbr/tests/testpackage/src/testext.c 89 | tools/integration.sh -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr-1.8.1-py2.6.egg-info/dependency_links.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr-1.8.1-py2.6.egg-info/entry_points.txt: -------------------------------------------------------------------------------- 1 | [distutils.setup_keywords] 2 | pbr = pbr.core:pbr 3 | 4 | [egg_info.writers] 5 | pbr.json = pbr.pbr_json:write_pbr_json 6 | 7 | [console_scripts] 8 | pbr = pbr.cmd.main:main 9 | 10 | [distutils.commands] 11 | testr = pbr.testr_command:Testr 12 | 13 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr-1.8.1-py2.6.egg-info/not-zip-safe: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr-1.8.1-py2.6.egg-info/top_level.txt: -------------------------------------------------------------------------------- 1 | pbr 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/webapp/src/test/resources/lib/python2.6/site-packages/pbr/__init__.py -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/cmd/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/webapp/src/test/resources/lib/python2.6/site-packages/pbr/cmd/__init__.py -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/extra_files.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | from distutils import errors 17 | import os 18 | 19 | _extra_files = [] 20 | 21 | 22 | def get_extra_files(): 23 | global _extra_files 24 | return _extra_files 25 | 26 | 27 | def set_extra_files(extra_files): 28 | # Let's do a sanity check 29 | for filename in extra_files: 30 | if not os.path.exists(filename): 31 | raise errors.DistutilsFileError( 32 | '%s from the extra_files option in setup.cfg does not ' 33 | 'exist' % filename) 34 | global _extra_files 35 | _extra_files[:] = extra_files[:] 36 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/find_package.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Hewlett-Packard Development Company, L.P. 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | import os 17 | 18 | import setuptools 19 | 20 | 21 | def smart_find_packages(package_list): 22 | """Run find_packages the way we intend.""" 23 | packages = [] 24 | for pkg in package_list.strip().split("\n"): 25 | pkg_path = pkg.replace('.', os.path.sep) 26 | packages.append(pkg) 27 | packages.extend(['%s.%s' % (pkg, f) 28 | for f in setuptools.find_packages(pkg_path)]) 29 | return "\n".join(set(packages)) 30 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/hooks/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Hewlett-Packard Development Company, L.P. 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | from pbr.hooks import backwards 17 | from pbr.hooks import commands 18 | from pbr.hooks import files 19 | from pbr.hooks import metadata 20 | 21 | 22 | def setup_hook(config): 23 | """Filter config parsed from a setup.cfg to inject our defaults.""" 24 | metadata_config = metadata.MetadataConfig(config) 25 | metadata_config.run() 26 | backwards.BackwardsCompatConfig(config).run() 27 | commands.CommandsConfig(config).run() 28 | files.FilesConfig(config, metadata_config.get_name()).run() 29 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/hooks/backwards.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Hewlett-Packard Development Company, L.P. 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | from pbr.hooks import base 17 | from pbr import packaging 18 | 19 | 20 | class BackwardsCompatConfig(base.BaseConfig): 21 | 22 | section = 'backwards_compat' 23 | 24 | def hook(self): 25 | self.config['include_package_data'] = 'True' 26 | packaging.append_text_list( 27 | self.config, 'dependency_links', 28 | packaging.parse_dependency_links()) 29 | packaging.append_text_list( 30 | self.config, 'tests_require', 31 | packaging.parse_requirements( 32 | packaging.TEST_REQUIREMENTS_FILES, 33 | strip_markers=True)) 34 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/hooks/base.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Hewlett-Packard Development Company, L.P. 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | 17 | class BaseConfig(object): 18 | 19 | section = None 20 | 21 | def __init__(self, config): 22 | self._global_config = config 23 | self.config = self._global_config.get(self.section, dict()) 24 | self.pbr_config = config.get('pbr', dict()) 25 | 26 | def run(self): 27 | self.hook() 28 | self.save() 29 | 30 | def hook(self): 31 | pass 32 | 33 | def save(self): 34 | self._global_config[self.section] = self.config 35 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/hooks/commands.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Hewlett-Packard Development Company, L.P. 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | import os 17 | 18 | from setuptools.command import easy_install 19 | 20 | from pbr.hooks import base 21 | from pbr import options 22 | from pbr import packaging 23 | 24 | 25 | class CommandsConfig(base.BaseConfig): 26 | 27 | section = 'global' 28 | 29 | def __init__(self, config): 30 | super(CommandsConfig, self).__init__(config) 31 | self.commands = self.config.get('commands', "") 32 | 33 | def save(self): 34 | self.config['commands'] = self.commands 35 | super(CommandsConfig, self).save() 36 | 37 | def add_command(self, command): 38 | self.commands = "%s\n%s" % (self.commands, command) 39 | 40 | def hook(self): 41 | self.add_command('pbr.packaging.LocalEggInfo') 42 | self.add_command('pbr.packaging.LocalSDist') 43 | self.add_command('pbr.packaging.LocalInstallScripts') 44 | self.add_command('pbr.packaging.LocalDevelop') 45 | self.add_command('pbr.packaging.LocalRPMVersion') 46 | if os.name != 'nt': 47 | easy_install.get_script_args = packaging.override_get_script_args 48 | 49 | if packaging.have_sphinx(): 50 | self.add_command('pbr.builddoc.LocalBuildDoc') 51 | self.add_command('pbr.builddoc.LocalBuildLatex') 52 | 53 | if os.path.exists('.testr.conf') and packaging.have_testr(): 54 | # There is a .testr.conf file. We want to use it. 55 | self.add_command('pbr.packaging.TestrTest') 56 | elif self.config.get('nosetests', False) and packaging.have_nose(): 57 | # We seem to still have nose configured 58 | self.add_command('pbr.packaging.NoseTest') 59 | 60 | use_egg = options.get_boolean_option( 61 | self.pbr_config, 'use-egg', 'PBR_USE_EGG') 62 | # We always want non-egg install unless explicitly requested 63 | if 'manpages' in self.pbr_config or not use_egg: 64 | self.add_command('pbr.packaging.LocalInstall') 65 | else: 66 | self.add_command('pbr.packaging.InstallWithGit') 67 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/hooks/metadata.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Hewlett-Packard Development Company, L.P. 2 | # All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 5 | # not use this file except in compliance with the License. You may obtain 6 | # a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations 14 | # under the License. 15 | 16 | from pbr.hooks import base 17 | from pbr import packaging 18 | 19 | 20 | class MetadataConfig(base.BaseConfig): 21 | 22 | section = 'metadata' 23 | 24 | def hook(self): 25 | self.config['version'] = packaging.get_version( 26 | self.config['name'], self.config.get('version', None)) 27 | packaging.append_text_list( 28 | self.config, 'requires_dist', 29 | packaging.parse_requirements()) 30 | 31 | def get_name(self): 32 | return self.config['name'] 33 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/options.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License, Version 2.0 (the "License"); 2 | # you may not use this file except in compliance with the License. 3 | # You may obtain a copy of the License at 4 | # 5 | # http://www.apache.org/licenses/LICENSE-2.0 6 | # 7 | # Unless required by applicable law or agreed to in writing, software 8 | # distributed under the License is distributed on an "AS IS" BASIS, 9 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 10 | # implied. 11 | # See the License for the specific language governing permissions and 12 | # limitations under the License. 13 | # 14 | # Copyright (C) 2013 Association of Universities for Research in Astronomy 15 | # (AURA) 16 | # 17 | # Redistribution and use in source and binary forms, with or without 18 | # modification, are permitted provided that the following conditions are met: 19 | # 20 | # 1. Redistributions of source code must retain the above copyright 21 | # notice, this list of conditions and the following disclaimer. 22 | # 23 | # 2. Redistributions in binary form must reproduce the above 24 | # copyright notice, this list of conditions and the following 25 | # disclaimer in the documentation and/or other materials provided 26 | # with the distribution. 27 | # 28 | # 3. The name of AURA and its representatives may not be used to 29 | # endorse or promote products derived from this software without 30 | # specific prior written permission. 31 | # 32 | # THIS SOFTWARE IS PROVIDED BY AURA ``AS IS'' AND ANY EXPRESS OR IMPLIED 33 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 34 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 35 | # DISCLAIMED. IN NO EVENT SHALL AURA BE LIABLE FOR ANY DIRECT, INDIRECT, 36 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 37 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 38 | # OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 39 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 40 | # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 41 | # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 42 | # DAMAGE. 43 | 44 | import os 45 | 46 | 47 | TRUE_VALUES = ('true', '1', 'yes') 48 | 49 | 50 | def get_boolean_option(option_dict, option_name, env_name): 51 | return ((option_name in option_dict 52 | and option_dict[option_name][1].lower() in TRUE_VALUES) or 53 | str(os.getenv(env_name)).lower() in TRUE_VALUES) 54 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/pbr_json.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011 OpenStack LLC. 2 | # Copyright 2012-2013 Hewlett-Packard Development Company, L.P. 3 | # All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 6 | # not use this file except in compliance with the License. You may obtain 7 | # a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | # License for the specific language governing permissions and limitations 15 | # under the License. 16 | 17 | import json 18 | 19 | from pbr import git 20 | 21 | 22 | def write_pbr_json(cmd, basename, filename): 23 | if not hasattr(cmd.distribution, 'pbr') or not cmd.distribution.pbr: 24 | return 25 | git_dir = git._run_git_functions() 26 | if not git_dir: 27 | return 28 | values = dict() 29 | git_version = git.get_git_short_sha(git_dir) 30 | is_release = git.get_is_release(git_dir) 31 | if git_version is not None: 32 | values['git_version'] = git_version 33 | values['is_release'] = is_release 34 | cmd.write_file('pbr', filename, json.dumps(values)) 35 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License, Version 2.0 (the "License"); 2 | # you may not use this file except in compliance with the License. 3 | # You may obtain a copy of the License at 4 | # 5 | # http://www.apache.org/licenses/LICENSE-2.0 6 | # 7 | # Unless required by applicable law or agreed to in writing, software 8 | # distributed under the License is distributed on an "AS IS" BASIS, 9 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 10 | # implied. 11 | # See the License for the specific language governing permissions and 12 | # limitations under the License. 13 | 14 | import os 15 | 16 | import testscenarios 17 | 18 | 19 | def load_tests(loader, standard_tests, pattern): 20 | # top level directory cached on loader instance 21 | this_dir = os.path.dirname(__file__) 22 | package_tests = loader.discover(start_dir=this_dir, pattern=pattern) 23 | result = loader.suiteClass() 24 | result.addTests(testscenarios.generate_scenarios(standard_tests)) 25 | result.addTests(testscenarios.generate_scenarios(package_tests)) 26 | return result 27 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/test_util.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. (HP) 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may 4 | # not use this file except in compliance with the License. You may obtain 5 | # a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations 13 | # under the License. 14 | 15 | import io 16 | import textwrap 17 | 18 | import six 19 | from six.moves import configparser 20 | 21 | from pbr.tests import base 22 | from pbr import util 23 | 24 | 25 | class TestExtrasRequireParsingScenarios(base.BaseTestCase): 26 | 27 | scenarios = [ 28 | ('simple_extras', { 29 | 'config_text': """ 30 | [extras] 31 | first = 32 | foo 33 | bar==1.0 34 | second = 35 | baz>=3.2 36 | foo 37 | """, 38 | 'expected_extra_requires': {'first': ['foo', 'bar==1.0'], 39 | 'second': ['baz>=3.2', 'foo']} 40 | }), 41 | ('with_markers', { 42 | 'config_text': """ 43 | [extras] 44 | test = 45 | foo:python_version=='2.6' 46 | bar 47 | baz<1.6 :python_version=='2.6' 48 | """, 49 | 'expected_extra_requires': { 50 | "test:(python_version=='2.6')": ['foo', 'baz<1.6'], 51 | "test": ['bar']}}), 52 | ('no_extras', { 53 | 'config_text': """ 54 | [metadata] 55 | long_description = foo 56 | """, 57 | 'expected_extra_requires': 58 | {} 59 | })] 60 | 61 | def config_from_ini(self, ini): 62 | config = {} 63 | parser = configparser.SafeConfigParser() 64 | ini = textwrap.dedent(six.u(ini)) 65 | parser.readfp(io.StringIO(ini)) 66 | for section in parser.sections(): 67 | config[section] = dict(parser.items(section)) 68 | return config 69 | 70 | def test_extras_parsing(self): 71 | config = self.config_from_ini(self.config_text) 72 | kwargs = util.setup_cfg_to_setup_kwargs(config) 73 | 74 | self.assertEqual(self.expected_extra_requires, 75 | kwargs['extras_require']) 76 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) 2005 Association of Universities for Research in Astronomy (AURA) 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following 11 | disclaimer in the documentation and/or other materials provided 12 | with the distribution. 13 | 14 | 3. The name of AURA and its representatives may not be used to 15 | endorse or promote products derived from this software without 16 | specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY AURA ``AS IS'' AND ANY EXPRESS OR IMPLIED 19 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 20 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL AURA BE LIABLE FOR ANY DIRECT, INDIRECT, 22 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 23 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 24 | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 26 | TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 27 | USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 28 | DAMAGE. 29 | 30 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include data_files/* 2 | exclude pbr_testpackage/extra.py 3 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/data_files/a.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/data_files/a.txt -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/data_files/b.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/data_files/b.txt -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/data_files/c.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/data_files/c.rst -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/extra-file.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/extra-file.txt -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/git-extra-file.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/git-extra-file.txt -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/pbr_testpackage/__init__.py: -------------------------------------------------------------------------------- 1 | import pbr.version 2 | 3 | __version__ = pbr.version.VersionInfo('pbr_testpackage').version_string() 4 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/pbr_testpackage/_setup_hooks.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # Copyright (C) 2013 Association of Universities for Research in Astronomy 17 | # (AURA) 18 | # 19 | # Redistribution and use in source and binary forms, with or without 20 | # modification, are permitted provided that the following conditions are met: 21 | # 22 | # 1. Redistributions of source code must retain the above copyright 23 | # notice, this list of conditions and the following disclaimer. 24 | # 25 | # 2. Redistributions in binary form must reproduce the above 26 | # copyright notice, this list of conditions and the following 27 | # disclaimer in the documentation and/or other materials provided 28 | # with the distribution. 29 | # 30 | # 3. The name of AURA and its representatives may not be used to 31 | # endorse or promote products derived from this software without 32 | # specific prior written permission. 33 | # 34 | # THIS SOFTWARE IS PROVIDED BY AURA ``AS IS'' AND ANY EXPRESS OR IMPLIED 35 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 36 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 37 | # DISCLAIMED. IN NO EVENT SHALL AURA BE LIABLE FOR ANY DIRECT, INDIRECT, 38 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 39 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 40 | 41 | from distutils.command import build_py 42 | 43 | 44 | def test_hook_1(config): 45 | print('test_hook_1') 46 | 47 | 48 | def test_hook_2(config): 49 | print('test_hook_2') 50 | 51 | 52 | class test_command(build_py.build_py): 53 | command_name = 'build_py' 54 | 55 | def run(self): 56 | print('Running custom build_py command.') 57 | return build_py.build_py.run(self) 58 | 59 | 60 | def test_pre_hook(cmdobj): 61 | print('build_ext pre-hook') 62 | 63 | 64 | def test_post_hook(cmdobj): 65 | print('build_ext post-hook') 66 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/pbr_testpackage/cmd.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | from __future__ import print_function 16 | 17 | 18 | def main(): 19 | print("PBR Test Command") 20 | 21 | 22 | class Foo(object): 23 | 24 | @classmethod 25 | def bar(self): 26 | print("PBR Test Command - with class!") 27 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/pbr_testpackage/extra.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/pbr_testpackage/extra.py -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/pbr_testpackage/package_data/1.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/pbr_testpackage/package_data/1.txt -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/pbr_testpackage/package_data/2.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/pbr_testpackage/package_data/2.txt -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/pbr_testpackage/wsgi.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | from __future__ import print_function 16 | 17 | 18 | def application(env, start_response): 19 | start_response('200 OK', [('Content-Type', 'text/html')]) 20 | return ["Hello World"] 21 | 22 | 23 | def main(): 24 | return application 25 | 26 | 27 | class WSGI(object): 28 | 29 | @classmethod 30 | def app(self): 31 | return application 32 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | name = pbr_testpackage 3 | # TODO(lifeless) we should inject this as needed otherwise we're not truely 4 | # testing postversioned codepaths. 5 | version = 0.1.dev 6 | author = OpenStack 7 | author-email = openstack-dev@lists.openstack.org 8 | home-page = http://pypi.python.org/pypi/pbr 9 | summary = Test package for testing pbr 10 | description-file = 11 | README.txt 12 | CHANGES.txt 13 | requires-python = >=2.5 14 | 15 | requires-dist = 16 | setuptools 17 | 18 | classifier = 19 | Development Status :: 3 - Alpha 20 | Intended Audience :: Developers 21 | License :: OSI Approved :: BSD License 22 | Programming Language :: Python 23 | Topic :: Scientific/Engineering 24 | Topic :: Software Development :: Build Tools 25 | Topic :: Software Development :: Libraries :: Python Modules 26 | Topic :: System :: Archiving :: Packaging 27 | 28 | keywords = packaging, distutils, setuptools 29 | 30 | [files] 31 | packages = pbr_testpackage 32 | package-data = testpackage = package_data/*.txt 33 | data-files = testpackage/data_files = data_files/*.txt 34 | extra-files = extra-file.txt 35 | 36 | [entry_points] 37 | console_scripts = 38 | pbr_test_cmd = pbr_testpackage.cmd:main 39 | pbr_test_cmd_with_class = pbr_testpackage.cmd:Foo.bar 40 | 41 | wsgi_scripts = 42 | pbr_test_wsgi = pbr_testpackage.wsgi:main 43 | pbr_test_wsgi_with_class = pbr_testpackage.wsgi:WSGI.app 44 | 45 | [extension=pbr_testpackage.testext] 46 | sources = src/testext.c 47 | optional = True 48 | 49 | [global] 50 | #setup-hooks = 51 | # pbr_testpackage._setup_hooks.test_hook_1 52 | # pbr_testpackage._setup_hooks.test_hook_2 53 | commands = pbr_testpackage._setup_hooks.test_command 54 | 55 | [build_ext] 56 | #pre-hook.test_pre_hook = pbr_testpackage._setup_hooks.test_pre_hook 57 | #post-hook.test_post_hook = pbr_testpackage._setup_hooks.test_post_hook 58 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | # implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | import setuptools 18 | 19 | setuptools.setup( 20 | setup_requires=['pbr'], 21 | pbr=True, 22 | ) 23 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/src/testext.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | static PyMethodDef TestextMethods[] = { 5 | {NULL, NULL, 0, NULL} 6 | }; 7 | 8 | 9 | #if PY_MAJOR_VERSION >=3 10 | static struct PyModuleDef testextmodule = { 11 | PyModuleDef_HEAD_INIT, 12 | "testext", 13 | -1, 14 | TestextMethods 15 | }; 16 | 17 | PyObject* 18 | PyInit_testext(void) 19 | { 20 | return PyModule_Create(&testextmodule); 21 | } 22 | #else 23 | PyMODINIT_FUNC 24 | inittestext(void) 25 | { 26 | Py_InitModule("testext", TestextMethods); 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/pbr/tests/testpackage/test-requirements.txt: -------------------------------------------------------------------------------- 1 | ordereddict;python_version=='2.6' 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests-2.9.1-py2.6.egg-info/dependency_links.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests-2.9.1-py2.6.egg-info/not-zip-safe: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests-2.9.1-py2.6.egg-info/requires.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | [security] 4 | pyOpenSSL>=0.13 5 | ndg-httpsclient 6 | pyasn1 -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests-2.9.1-py2.6.egg-info/top_level.txt: -------------------------------------------------------------------------------- 1 | requests 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # __ 4 | # /__) _ _ _ _ _/ _ 5 | # / ( (- (/ (/ (- _) / _) 6 | # / 7 | 8 | """ 9 | Requests HTTP library 10 | ~~~~~~~~~~~~~~~~~~~~~ 11 | 12 | Requests is an HTTP library, written in Python, for human beings. Basic GET 13 | usage: 14 | 15 | >>> import requests 16 | >>> r = requests.get('https://www.python.org') 17 | >>> r.status_code 18 | 200 19 | >>> 'Python is a programming language' in r.content 20 | True 21 | 22 | ... or POST: 23 | 24 | >>> payload = dict(key1='value1', key2='value2') 25 | >>> r = requests.post('http://httpbin.org/post', data=payload) 26 | >>> print(r.text) 27 | { 28 | ... 29 | "form": { 30 | "key2": "value2", 31 | "key1": "value1" 32 | }, 33 | ... 34 | } 35 | 36 | The other HTTP methods are supported - see `requests.api`. Full documentation 37 | is at . 38 | 39 | :copyright: (c) 2015 by Kenneth Reitz. 40 | :license: Apache 2.0, see LICENSE for more details. 41 | 42 | """ 43 | 44 | __title__ = 'requests' 45 | __version__ = '2.9.1' 46 | __build__ = 0x020901 47 | __author__ = 'Kenneth Reitz' 48 | __license__ = 'Apache 2.0' 49 | __copyright__ = 'Copyright 2015 Kenneth Reitz' 50 | 51 | # Attempt to enable urllib3's SNI support, if possible 52 | try: 53 | from .packages.urllib3.contrib import pyopenssl 54 | pyopenssl.inject_into_urllib3() 55 | except ImportError: 56 | pass 57 | 58 | from . import utils 59 | from .models import Request, Response, PreparedRequest 60 | from .api import request, get, head, post, patch, put, delete, options 61 | from .sessions import session, Session 62 | from .status_codes import codes 63 | from .exceptions import ( 64 | RequestException, Timeout, URLRequired, 65 | TooManyRedirects, HTTPError, ConnectionError, 66 | FileModeWarning, 67 | ) 68 | 69 | # Set default logging handler to avoid "No handler found" warnings. 70 | import logging 71 | try: # Python 2.7+ 72 | from logging import NullHandler 73 | except ImportError: 74 | class NullHandler(logging.Handler): 75 | def emit(self, record): 76 | pass 77 | 78 | logging.getLogger(__name__).addHandler(NullHandler()) 79 | 80 | import warnings 81 | 82 | # FileModeWarnings go off per the default. 83 | warnings.simplefilter('default', FileModeWarning, append=True) 84 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/certs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | certs.py 6 | ~~~~~~~~ 7 | 8 | This module returns the preferred default CA certificate bundle. 9 | 10 | If you are packaging Requests, e.g., for a Linux distribution or a managed 11 | environment, you can change the definition of where() to return a separately 12 | packaged CA bundle. 13 | """ 14 | import os.path 15 | 16 | try: 17 | from certifi import where 18 | except ImportError: 19 | def where(): 20 | """Return the preferred certificate bundle.""" 21 | # vendored bundle inside Requests 22 | return os.path.join(os.path.dirname(__file__), 'cacert.pem') 23 | 24 | if __name__ == '__main__': 25 | print(where()) 26 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/compat.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | pythoncompat 5 | """ 6 | 7 | from .packages import chardet 8 | 9 | import sys 10 | 11 | # ------- 12 | # Pythons 13 | # ------- 14 | 15 | # Syntax sugar. 16 | _ver = sys.version_info 17 | 18 | #: Python 2.x? 19 | is_py2 = (_ver[0] == 2) 20 | 21 | #: Python 3.x? 22 | is_py3 = (_ver[0] == 3) 23 | 24 | try: 25 | import simplejson as json 26 | except (ImportError, SyntaxError): 27 | # simplejson does not support Python 3.2, it throws a SyntaxError 28 | # because of u'...' Unicode literals. 29 | import json 30 | 31 | # --------- 32 | # Specifics 33 | # --------- 34 | 35 | if is_py2: 36 | from urllib import quote, unquote, quote_plus, unquote_plus, urlencode, getproxies, proxy_bypass 37 | from urlparse import urlparse, urlunparse, urljoin, urlsplit, urldefrag 38 | from urllib2 import parse_http_list 39 | import cookielib 40 | from Cookie import Morsel 41 | from StringIO import StringIO 42 | from .packages.urllib3.packages.ordered_dict import OrderedDict 43 | 44 | builtin_str = str 45 | bytes = str 46 | str = unicode 47 | basestring = basestring 48 | numeric_types = (int, long, float) 49 | 50 | elif is_py3: 51 | from urllib.parse import urlparse, urlunparse, urljoin, urlsplit, urlencode, quote, unquote, quote_plus, unquote_plus, urldefrag 52 | from urllib.request import parse_http_list, getproxies, proxy_bypass 53 | from http import cookiejar as cookielib 54 | from http.cookies import Morsel 55 | from io import StringIO 56 | from collections import OrderedDict 57 | 58 | builtin_str = str 59 | str = str 60 | bytes = bytes 61 | basestring = (str, bytes) 62 | numeric_types = (int, float) 63 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/hooks.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.hooks 5 | ~~~~~~~~~~~~~~ 6 | 7 | This module provides the capabilities for the Requests hooks system. 8 | 9 | Available hooks: 10 | 11 | ``response``: 12 | The response generated from a Request. 13 | 14 | """ 15 | HOOKS = ['response'] 16 | 17 | def default_hooks(): 18 | return dict((event, []) for event in HOOKS) 19 | 20 | # TODO: response is the only one 21 | 22 | 23 | def dispatch_hook(key, hooks, hook_data, **kwargs): 24 | """Dispatches a hook dictionary on a given piece of data.""" 25 | hooks = hooks or dict() 26 | hooks = hooks.get(key) 27 | if hooks: 28 | if hasattr(hooks, '__call__'): 29 | hooks = [hooks] 30 | for hook in hooks: 31 | _hook_data = hook(hook_data, **kwargs) 32 | if _hook_data is not None: 33 | hook_data = _hook_data 34 | return hook_data 35 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/packages/__init__.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Debian and other distributions "unbundle" requests' vendored dependencies, and 3 | rewrite all imports to use the global versions of ``urllib3`` and ``chardet``. 4 | The problem with this is that not only requests itself imports those 5 | dependencies, but third-party code outside of the distros' control too. 6 | 7 | In reaction to these problems, the distro maintainers replaced 8 | ``requests.packages`` with a magical "stub module" that imports the correct 9 | modules. The implementations were varying in quality and all had severe 10 | problems. For example, a symlink (or hardlink) that links the correct modules 11 | into place introduces problems regarding object identity, since you now have 12 | two modules in `sys.modules` with the same API, but different identities:: 13 | 14 | requests.packages.urllib3 is not urllib3 15 | 16 | With version ``2.5.2``, requests started to maintain its own stub, so that 17 | distro-specific breakage would be reduced to a minimum, even though the whole 18 | issue is not requests' fault in the first place. See 19 | https://github.com/kennethreitz/requests/pull/2375 for the corresponding pull 20 | request. 21 | ''' 22 | 23 | from __future__ import absolute_import 24 | import sys 25 | 26 | try: 27 | from . import urllib3 28 | except ImportError: 29 | import urllib3 30 | sys.modules['%s.urllib3' % __name__] = urllib3 31 | 32 | try: 33 | from . import chardet 34 | except ImportError: 35 | import chardet 36 | sys.modules['%s.chardet' % __name__] = chardet 37 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/packages/chardet/__init__.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # This library is free software; you can redistribute it and/or 3 | # modify it under the terms of the GNU Lesser General Public 4 | # License as published by the Free Software Foundation; either 5 | # version 2.1 of the License, or (at your option) any later version. 6 | # 7 | # This library is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10 | # Lesser General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU Lesser General Public 13 | # License along with this library; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 15 | # 02110-1301 USA 16 | ######################### END LICENSE BLOCK ######################### 17 | 18 | __version__ = "2.3.0" 19 | from sys import version_info 20 | 21 | 22 | def detect(aBuf): 23 | if ((version_info < (3, 0) and isinstance(aBuf, unicode)) or 24 | (version_info >= (3, 0) and not isinstance(aBuf, bytes))): 25 | raise ValueError('Expected a bytes object, not a unicode object') 26 | 27 | from . import universaldetector 28 | u = universaldetector.UniversalDetector() 29 | u.reset() 30 | u.feed(aBuf) 31 | u.close() 32 | return u.result 33 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/packages/chardet/big5prober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Communicator client code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import Big5DistributionAnalysis 31 | from .mbcssm import Big5SMModel 32 | 33 | 34 | class Big5Prober(MultiByteCharSetProber): 35 | def __init__(self): 36 | MultiByteCharSetProber.__init__(self) 37 | self._mCodingSM = CodingStateMachine(Big5SMModel) 38 | self._mDistributionAnalyzer = Big5DistributionAnalysis() 39 | self.reset() 40 | 41 | def get_charset_name(self): 42 | return "Big5" 43 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/packages/chardet/charsetprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Universal charset detector code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 2001 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # Shy Shalom - original C code 12 | # 13 | # This library is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU Lesser General Public 15 | # License as published by the Free Software Foundation; either 16 | # version 2.1 of the License, or (at your option) any later version. 17 | # 18 | # This library is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | # Lesser General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU Lesser General Public 24 | # License along with this library; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 26 | # 02110-1301 USA 27 | ######################### END LICENSE BLOCK ######################### 28 | 29 | from . import constants 30 | import re 31 | 32 | 33 | class CharSetProber: 34 | def __init__(self): 35 | pass 36 | 37 | def reset(self): 38 | self._mState = constants.eDetecting 39 | 40 | def get_charset_name(self): 41 | return None 42 | 43 | def feed(self, aBuf): 44 | pass 45 | 46 | def get_state(self): 47 | return self._mState 48 | 49 | def get_confidence(self): 50 | return 0.0 51 | 52 | def filter_high_bit_only(self, aBuf): 53 | aBuf = re.sub(b'([\x00-\x7F])+', b' ', aBuf) 54 | return aBuf 55 | 56 | def filter_without_english_letters(self, aBuf): 57 | aBuf = re.sub(b'([A-Za-z])+', b' ', aBuf) 58 | return aBuf 59 | 60 | def filter_with_english_letters(self, aBuf): 61 | # TODO 62 | return aBuf 63 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/packages/chardet/codingstatemachine.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .constants import eStart 29 | from .compat import wrap_ord 30 | 31 | 32 | class CodingStateMachine: 33 | def __init__(self, sm): 34 | self._mModel = sm 35 | self._mCurrentBytePos = 0 36 | self._mCurrentCharLen = 0 37 | self.reset() 38 | 39 | def reset(self): 40 | self._mCurrentState = eStart 41 | 42 | def next_state(self, c): 43 | # for each byte we get its class 44 | # if it is first byte, we also get byte length 45 | # PY3K: aBuf is a byte stream, so c is an int, not a byte 46 | byteCls = self._mModel['classTable'][wrap_ord(c)] 47 | if self._mCurrentState == eStart: 48 | self._mCurrentBytePos = 0 49 | self._mCurrentCharLen = self._mModel['charLenTable'][byteCls] 50 | # from byte's class and stateTable, we get its next state 51 | curr_state = (self._mCurrentState * self._mModel['classFactor'] 52 | + byteCls) 53 | self._mCurrentState = self._mModel['stateTable'][curr_state] 54 | self._mCurrentBytePos += 1 55 | return self._mCurrentState 56 | 57 | def get_current_charlen(self): 58 | return self._mCurrentCharLen 59 | 60 | def get_coding_state_machine(self): 61 | return self._mModel['name'] 62 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/packages/chardet/compat.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # Contributor(s): 3 | # Ian Cordasco - port to Python 4 | # 5 | # This library is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU Lesser General Public 7 | # License as published by the Free Software Foundation; either 8 | # version 2.1 of the License, or (at your option) any later version. 9 | # 10 | # This library is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Lesser General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Lesser General Public 16 | # License along with this library; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 18 | # 02110-1301 USA 19 | ######################### END LICENSE BLOCK ######################### 20 | 21 | import sys 22 | 23 | 24 | if sys.version_info < (3, 0): 25 | base_str = (str, unicode) 26 | else: 27 | base_str = (bytes, str) 28 | 29 | 30 | def wrap_ord(a): 31 | if sys.version_info < (3, 0) and isinstance(a, base_str): 32 | return ord(a) 33 | else: 34 | return a 35 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/packages/chardet/constants.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Universal charset detector code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 2001 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # Shy Shalom - original C code 12 | # 13 | # This library is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU Lesser General Public 15 | # License as published by the Free Software Foundation; either 16 | # version 2.1 of the License, or (at your option) any later version. 17 | # 18 | # This library is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | # Lesser General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU Lesser General Public 24 | # License along with this library; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 26 | # 02110-1301 USA 27 | ######################### END LICENSE BLOCK ######################### 28 | 29 | _debug = 0 30 | 31 | eDetecting = 0 32 | eFoundIt = 1 33 | eNotMe = 2 34 | 35 | eStart = 0 36 | eError = 1 37 | eItsMe = 2 38 | 39 | SHORTCUT_THRESHOLD = 0.95 40 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/packages/chardet/cp949prober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import EUCKRDistributionAnalysis 31 | from .mbcssm import CP949SMModel 32 | 33 | 34 | class CP949Prober(MultiByteCharSetProber): 35 | def __init__(self): 36 | MultiByteCharSetProber.__init__(self) 37 | self._mCodingSM = CodingStateMachine(CP949SMModel) 38 | # NOTE: CP949 is a superset of EUC-KR, so the distribution should be 39 | # not different. 40 | self._mDistributionAnalyzer = EUCKRDistributionAnalysis() 41 | self.reset() 42 | 43 | def get_charset_name(self): 44 | return "CP949" 45 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/packages/chardet/euckrprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import EUCKRDistributionAnalysis 31 | from .mbcssm import EUCKRSMModel 32 | 33 | 34 | class EUCKRProber(MultiByteCharSetProber): 35 | def __init__(self): 36 | MultiByteCharSetProber.__init__(self) 37 | self._mCodingSM = CodingStateMachine(EUCKRSMModel) 38 | self._mDistributionAnalyzer = EUCKRDistributionAnalysis() 39 | self.reset() 40 | 41 | def get_charset_name(self): 42 | return "EUC-KR" 43 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/packages/chardet/euctwprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import EUCTWDistributionAnalysis 31 | from .mbcssm import EUCTWSMModel 32 | 33 | class EUCTWProber(MultiByteCharSetProber): 34 | def __init__(self): 35 | MultiByteCharSetProber.__init__(self) 36 | self._mCodingSM = CodingStateMachine(EUCTWSMModel) 37 | self._mDistributionAnalyzer = EUCTWDistributionAnalysis() 38 | self.reset() 39 | 40 | def get_charset_name(self): 41 | return "EUC-TW" 42 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/packages/chardet/gb2312prober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import GB2312DistributionAnalysis 31 | from .mbcssm import GB2312SMModel 32 | 33 | class GB2312Prober(MultiByteCharSetProber): 34 | def __init__(self): 35 | MultiByteCharSetProber.__init__(self) 36 | self._mCodingSM = CodingStateMachine(GB2312SMModel) 37 | self._mDistributionAnalyzer = GB2312DistributionAnalysis() 38 | self.reset() 39 | 40 | def get_charset_name(self): 41 | return "GB2312" 42 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/packages/chardet/mbcsgroupprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Universal charset detector code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 2001 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # Shy Shalom - original C code 12 | # Proofpoint, Inc. 13 | # 14 | # This library is free software; you can redistribute it and/or 15 | # modify it under the terms of the GNU Lesser General Public 16 | # License as published by the Free Software Foundation; either 17 | # version 2.1 of the License, or (at your option) any later version. 18 | # 19 | # This library is distributed in the hope that it will be useful, 20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 22 | # Lesser General Public License for more details. 23 | # 24 | # You should have received a copy of the GNU Lesser General Public 25 | # License along with this library; if not, write to the Free Software 26 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 27 | # 02110-1301 USA 28 | ######################### END LICENSE BLOCK ######################### 29 | 30 | from .charsetgroupprober import CharSetGroupProber 31 | from .utf8prober import UTF8Prober 32 | from .sjisprober import SJISProber 33 | from .eucjpprober import EUCJPProber 34 | from .gb2312prober import GB2312Prober 35 | from .euckrprober import EUCKRProber 36 | from .cp949prober import CP949Prober 37 | from .big5prober import Big5Prober 38 | from .euctwprober import EUCTWProber 39 | 40 | 41 | class MBCSGroupProber(CharSetGroupProber): 42 | def __init__(self): 43 | CharSetGroupProber.__init__(self) 44 | self._mProbers = [ 45 | UTF8Prober(), 46 | SJISProber(), 47 | EUCJPProber(), 48 | GB2312Prober(), 49 | EUCKRProber(), 50 | CP949Prober(), 51 | Big5Prober(), 52 | EUCTWProber() 53 | ] 54 | self.reset() 55 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/packages/urllib3/contrib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/webapp/src/test/resources/lib/python2.6/site-packages/requests/packages/urllib3/contrib/__init__.py -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/packages/urllib3/filepost.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | import codecs 3 | 4 | from uuid import uuid4 5 | from io import BytesIO 6 | 7 | from .packages import six 8 | from .packages.six import b 9 | from .fields import RequestField 10 | 11 | writer = codecs.lookup('utf-8')[3] 12 | 13 | 14 | def choose_boundary(): 15 | """ 16 | Our embarassingly-simple replacement for mimetools.choose_boundary. 17 | """ 18 | return uuid4().hex 19 | 20 | 21 | def iter_field_objects(fields): 22 | """ 23 | Iterate over fields. 24 | 25 | Supports list of (k, v) tuples and dicts, and lists of 26 | :class:`~urllib3.fields.RequestField`. 27 | 28 | """ 29 | if isinstance(fields, dict): 30 | i = six.iteritems(fields) 31 | else: 32 | i = iter(fields) 33 | 34 | for field in i: 35 | if isinstance(field, RequestField): 36 | yield field 37 | else: 38 | yield RequestField.from_tuples(*field) 39 | 40 | 41 | def iter_fields(fields): 42 | """ 43 | .. deprecated:: 1.6 44 | 45 | Iterate over fields. 46 | 47 | The addition of :class:`~urllib3.fields.RequestField` makes this function 48 | obsolete. Instead, use :func:`iter_field_objects`, which returns 49 | :class:`~urllib3.fields.RequestField` objects. 50 | 51 | Supports list of (k, v) tuples and dicts. 52 | """ 53 | if isinstance(fields, dict): 54 | return ((k, v) for k, v in six.iteritems(fields)) 55 | 56 | return ((k, v) for k, v in fields) 57 | 58 | 59 | def encode_multipart_formdata(fields, boundary=None): 60 | """ 61 | Encode a dictionary of ``fields`` using the multipart/form-data MIME format. 62 | 63 | :param fields: 64 | Dictionary of fields or list of (key, :class:`~urllib3.fields.RequestField`). 65 | 66 | :param boundary: 67 | If not specified, then a random boundary will be generated using 68 | :func:`mimetools.choose_boundary`. 69 | """ 70 | body = BytesIO() 71 | if boundary is None: 72 | boundary = choose_boundary() 73 | 74 | for field in iter_field_objects(fields): 75 | body.write(b('--%s\r\n' % (boundary))) 76 | 77 | writer(body).write(field.render_headers()) 78 | data = field.data 79 | 80 | if isinstance(data, int): 81 | data = str(data) # Backwards compatibility 82 | 83 | if isinstance(data, six.text_type): 84 | writer(body).write(data) 85 | else: 86 | body.write(data) 87 | 88 | body.write(b'\r\n') 89 | 90 | body.write(b('--%s--\r\n' % (boundary))) 91 | 92 | content_type = str('multipart/form-data; boundary=%s' % boundary) 93 | 94 | return body.getvalue(), content_type 95 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/packages/urllib3/packages/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from . import ssl_match_hostname 4 | 5 | __all__ = ('ssl_match_hostname', ) 6 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py: -------------------------------------------------------------------------------- 1 | try: 2 | # Python 3.2+ 3 | from ssl import CertificateError, match_hostname 4 | except ImportError: 5 | try: 6 | # Backport of the function from a pypi module 7 | from backports.ssl_match_hostname import CertificateError, match_hostname 8 | except ImportError: 9 | # Our vendored copy 10 | from ._implementation import CertificateError, match_hostname 11 | 12 | # Not needed, but documenting what we provide. 13 | __all__ = ('CertificateError', 'match_hostname') 14 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/packages/urllib3/util/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | # For backwards compatibility, provide imports that used to be here. 3 | from .connection import is_connection_dropped 4 | from .request import make_headers 5 | from .response import is_fp_closed 6 | from .ssl_ import ( 7 | SSLContext, 8 | HAS_SNI, 9 | assert_fingerprint, 10 | resolve_cert_reqs, 11 | resolve_ssl_version, 12 | ssl_wrap_socket, 13 | ) 14 | from .timeout import ( 15 | current_time, 16 | Timeout, 17 | ) 18 | 19 | from .retry import Retry 20 | from .url import ( 21 | get_host, 22 | parse_url, 23 | split_first, 24 | Url, 25 | ) 26 | 27 | __all__ = ( 28 | 'HAS_SNI', 29 | 'SSLContext', 30 | 'Retry', 31 | 'Timeout', 32 | 'Url', 33 | 'assert_fingerprint', 34 | 'current_time', 35 | 'is_connection_dropped', 36 | 'is_fp_closed', 37 | 'get_host', 38 | 'parse_url', 39 | 'make_headers', 40 | 'resolve_cert_reqs', 41 | 'resolve_ssl_version', 42 | 'split_first', 43 | 'ssl_wrap_socket', 44 | ) 45 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/packages/urllib3/util/request.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from base64 import b64encode 3 | 4 | from ..packages.six import b 5 | 6 | ACCEPT_ENCODING = 'gzip,deflate' 7 | 8 | 9 | def make_headers(keep_alive=None, accept_encoding=None, user_agent=None, 10 | basic_auth=None, proxy_basic_auth=None, disable_cache=None): 11 | """ 12 | Shortcuts for generating request headers. 13 | 14 | :param keep_alive: 15 | If ``True``, adds 'connection: keep-alive' header. 16 | 17 | :param accept_encoding: 18 | Can be a boolean, list, or string. 19 | ``True`` translates to 'gzip,deflate'. 20 | List will get joined by comma. 21 | String will be used as provided. 22 | 23 | :param user_agent: 24 | String representing the user-agent you want, such as 25 | "python-urllib3/0.6" 26 | 27 | :param basic_auth: 28 | Colon-separated username:password string for 'authorization: basic ...' 29 | auth header. 30 | 31 | :param proxy_basic_auth: 32 | Colon-separated username:password string for 'proxy-authorization: basic ...' 33 | auth header. 34 | 35 | :param disable_cache: 36 | If ``True``, adds 'cache-control: no-cache' header. 37 | 38 | Example:: 39 | 40 | >>> make_headers(keep_alive=True, user_agent="Batman/1.0") 41 | {'connection': 'keep-alive', 'user-agent': 'Batman/1.0'} 42 | >>> make_headers(accept_encoding=True) 43 | {'accept-encoding': 'gzip,deflate'} 44 | """ 45 | headers = {} 46 | if accept_encoding: 47 | if isinstance(accept_encoding, str): 48 | pass 49 | elif isinstance(accept_encoding, list): 50 | accept_encoding = ','.join(accept_encoding) 51 | else: 52 | accept_encoding = ACCEPT_ENCODING 53 | headers['accept-encoding'] = accept_encoding 54 | 55 | if user_agent: 56 | headers['user-agent'] = user_agent 57 | 58 | if keep_alive: 59 | headers['connection'] = 'keep-alive' 60 | 61 | if basic_auth: 62 | headers['authorization'] = 'Basic ' + \ 63 | b64encode(b(basic_auth)).decode('utf-8') 64 | 65 | if proxy_basic_auth: 66 | headers['proxy-authorization'] = 'Basic ' + \ 67 | b64encode(b(proxy_basic_auth)).decode('utf-8') 68 | 69 | if disable_cache: 70 | headers['cache-control'] = 'no-cache' 71 | 72 | return headers 73 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/requests/packages/urllib3/util/response.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from ..packages.six.moves import http_client as httplib 3 | 4 | from ..exceptions import HeaderParsingError 5 | 6 | 7 | def is_fp_closed(obj): 8 | """ 9 | Checks whether a given file-like object is closed. 10 | 11 | :param obj: 12 | The file-like object to check. 13 | """ 14 | 15 | try: 16 | # Check via the official file-like-object way. 17 | return obj.closed 18 | except AttributeError: 19 | pass 20 | 21 | try: 22 | # Check if the object is a container for another file-like object that 23 | # gets released on exhaustion (e.g. HTTPResponse). 24 | return obj.fp is None 25 | except AttributeError: 26 | pass 27 | 28 | raise ValueError("Unable to determine whether fp is closed.") 29 | 30 | 31 | def assert_header_parsing(headers): 32 | """ 33 | Asserts whether all headers have been successfully parsed. 34 | Extracts encountered errors from the result of parsing headers. 35 | 36 | Only works on Python 3. 37 | 38 | :param headers: Headers to verify. 39 | :type headers: `httplib.HTTPMessage`. 40 | 41 | :raises urllib3.exceptions.HeaderParsingError: 42 | If parsing errors are found. 43 | """ 44 | 45 | # This will fail silently if we pass in the wrong kind of parameter. 46 | # To make debugging easier add an explicit check. 47 | if not isinstance(headers, httplib.HTTPMessage): 48 | raise TypeError('expected httplib.Message, got {0}.'.format( 49 | type(headers))) 50 | 51 | defects = getattr(headers, 'defects', None) 52 | get_payload = getattr(headers, 'get_payload', None) 53 | 54 | unparsed_data = None 55 | if get_payload: # Platform-specific: Python 3. 56 | unparsed_data = get_payload() 57 | 58 | if defects or unparsed_data: 59 | raise HeaderParsingError(defects=defects, unparsed_data=unparsed_data) 60 | 61 | 62 | def is_response_to_head(response): 63 | """ 64 | Checks, wether a the request of a response has been a HEAD-request. 65 | Handles the quirks of AppEngine. 66 | 67 | :param conn: 68 | :type conn: :class:`httplib.HTTPResponse` 69 | """ 70 | # FIXME: Can we do this somehow without accessing private httplib _method? 71 | method = response._method 72 | if isinstance(method, int): # Platform-specific: Appengine 73 | return method == 3 74 | return method.upper() == 'HEAD' 75 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium-2.53.1-py2.6.egg-info/dependency_links.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium-2.53.1-py2.6.egg-info/not-zip-safe: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium-2.53.1-py2.6.egg-info/pbr.json: -------------------------------------------------------------------------------- 1 | {"is_release": false, "git_version": "6131fa4"} -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium-2.53.1-py2.6.egg-info/top_level.txt: -------------------------------------------------------------------------------- 1 | selenium 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium-2.53.1.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium-2.53.1.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.26.0) 3 | Root-Is-Purelib: true 4 | Tag: py2-none-any 5 | 6 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium-2.53.1.dist-info/metadata.json: -------------------------------------------------------------------------------- 1 | {"generator": "bdist_wheel (0.26.0)", "summary": "Python bindings for Selenium", "classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX", "Operating System :: Microsoft :: Windows", "Operating System :: MacOS :: MacOS X", "Topic :: Software Development :: Testing", "Topic :: Software Development :: Libraries", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4"], "extensions": {"python.details": {"project_urls": {"Home": "https://github.com/SeleniumHQ/selenium/"}, "document_names": {"description": "DESCRIPTION.rst"}}}, "metadata_version": "2.0", "name": "selenium", "version": "2.53.1"} -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium-2.53.1.dist-info/pbr.json: -------------------------------------------------------------------------------- 1 | {"is_release": false, "git_version": "6131fa4"} -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium-2.53.1.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | selenium 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from selenium import selenium 19 | 20 | 21 | __version__ = "2.53.1" 22 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/common/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from . import exceptions 19 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from .firefox.webdriver import WebDriver as Firefox 19 | from .firefox.firefox_profile import FirefoxProfile 20 | from .chrome.webdriver import WebDriver as Chrome 21 | from .chrome.options import Options as ChromeOptions 22 | from .ie.webdriver import WebDriver as Ie 23 | from .edge.webdriver import WebDriver as Edge 24 | from .opera.webdriver import WebDriver as Opera 25 | from .safari.webdriver import WebDriver as Safari 26 | from .blackberry.webdriver import WebDriver as BlackBerry 27 | from .phantomjs.webdriver import WebDriver as PhantomJS 28 | from .android.webdriver import WebDriver as Android 29 | from .remote.webdriver import WebDriver as Remote 30 | from .common.desired_capabilities import DesiredCapabilities 31 | from .common.action_chains import ActionChains 32 | from .common.touch_actions import TouchActions 33 | from .common.proxy import Proxy 34 | 35 | __version__ = '2.53.1' 36 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/android/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/android/webdriver.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | import base64 19 | from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver 20 | from selenium.webdriver.common.desired_capabilities import DesiredCapabilities 21 | 22 | class WebDriver(RemoteWebDriver): 23 | """ 24 | Simple RemoteWebDriver wrapper to start connect to Selendroid's WebView app 25 | 26 | For more info on getting started with Selendroid 27 | http://selendroid.io/mobileWeb.html 28 | """ 29 | 30 | def __init__(self, host="localhost", port=4444, desired_capabilities=DesiredCapabilities.ANDROID): 31 | """ 32 | Creates a new instance of Selendroid using the WebView app 33 | 34 | :Args: 35 | - host - location of where selendroid is running 36 | - port - port that selendroid is running on 37 | - desired_capabilities: Dictionary object with capabilities 38 | """ 39 | RemoteWebDriver.__init__(self, 40 | command_executor="http://%s:%d/wd/hub" % (host, port), 41 | desired_capabilities=desired_capabilities) 42 | 43 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/blackberry/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/chrome/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/chrome/remote_connection.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from selenium.webdriver.remote.remote_connection import RemoteConnection 19 | 20 | class ChromeRemoteConnection(RemoteConnection): 21 | 22 | def __init__(self, remote_server_addr, keep_alive=True): 23 | RemoteConnection.__init__(self, remote_server_addr, keep_alive) 24 | self._commands["launchApp"] = ('POST', 25 | '/session/$sessionId/chromium/launch_app') 26 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/chrome/service.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | from selenium.webdriver.common import service 18 | 19 | class Service(service.Service): 20 | """ 21 | Object that manages the starting and stopping of the ChromeDriver 22 | """ 23 | 24 | def __init__(self, executable_path, port=0, service_args=None, 25 | log_path=None, env=None): 26 | """ 27 | Creates a new instance of the Service 28 | 29 | :Args: 30 | - executable_path : Path to the ChromeDriver 31 | - port : Port the service is running on 32 | - service_args : List of args to pass to the chromedriver service 33 | - log_path : Path for the chromedriver service to log to""" 34 | 35 | self.service_args = service_args or [] 36 | if log_path: 37 | self.service_args.append('--log-path=%s' % log_path) 38 | 39 | service.Service.__init__(self, executable_path, port=port, env=env, 40 | start_error_message="Please see https://sites.google.com/a/chromium.org/chromedriver/home") 41 | 42 | def command_line_args(self): 43 | return ["--port=%d" % self.port] + self.service_args 44 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/common/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/common/by.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | """ 19 | The By implementation. 20 | """ 21 | 22 | class By(object): 23 | """ 24 | Set of supported locator strategies. 25 | """ 26 | 27 | ID = "id" 28 | XPATH = "xpath" 29 | LINK_TEXT = "link text" 30 | PARTIAL_LINK_TEXT = "partial link text" 31 | NAME = "name" 32 | TAG_NAME = "tag name" 33 | CLASS_NAME = "class name" 34 | CSS_SELECTOR = "css selector" 35 | 36 | @classmethod 37 | def is_valid(cls, by): 38 | for attr in dir(cls): 39 | if by == getattr(cls, attr): 40 | return True 41 | return False 42 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/common/html5/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/common/html5/application_cache.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | """ 19 | The ApplicationCache implementaion. 20 | """ 21 | 22 | from selenium.webdriver.remote.command import Command 23 | 24 | class ApplicationCache(object): 25 | """ 26 | """ 27 | 28 | UNCACHED = 0 29 | IDLE = 1 30 | CHECKING = 2 31 | DOWNLOADING = 3 32 | UPDATE_READY = 4 33 | OBSOLETE = 5 34 | 35 | def __init__(self, driver): 36 | """ 37 | Creates a new Aplication Cache. 38 | 39 | :Args: 40 | - driver: The WebDriver instance which performs user actions. 41 | """ 42 | self.driver = driver 43 | 44 | @property 45 | def status(self): 46 | """ 47 | Returns a current status of application cache. 48 | """ 49 | return self.driver.execute(Command.GET_APP_CACHE_STATUS)['value'] 50 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/edge/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/edge/options.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from selenium.webdriver.common.desired_capabilities import DesiredCapabilities 19 | 20 | 21 | class Options(object): 22 | 23 | def __init__(self): 24 | self._page_load_strategy = "normal" 25 | 26 | @property 27 | def page_load_strategy(self): 28 | return self._page_load_strategy 29 | 30 | @page_load_strategy.setter 31 | def page_load_strategy(self, value): 32 | if value not in ['normal', 'eager', 'none']: 33 | raise ValueError("Page Load Strategy should be 'normal', 'eager' or 'none'.") 34 | self._page_load_strategy = value 35 | 36 | def to_capabilities(self): 37 | """ 38 | Creates a capabilities with all the options that have been set and 39 | 40 | returns a dictionary with everything 41 | """ 42 | edge = DesiredCapabilities.EDGE.copy() 43 | edge['pageLoadStrategy'] = self._page_load_strategy 44 | 45 | return edge 46 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/edge/service.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from subprocess import PIPE 19 | from selenium.webdriver.common import service 20 | 21 | class Service(service.Service): 22 | def __init__(self, executable_path, port=0, log_file=PIPE): 23 | service.Service.__init__(self, executable_path, port=port, log_file=log_file, 24 | start_error_message="Please download from http://go.microsoft.com/fwlink/?LinkId=619687 ") 25 | 26 | def command_line_args(self): 27 | return ["--port=%d" % self.port] 28 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/edge/webdriver.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from selenium.webdriver.common import utils 19 | from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver 20 | from selenium.webdriver.remote.remote_connection import RemoteConnection 21 | from selenium.webdriver.common.desired_capabilities import DesiredCapabilities 22 | from .service import Service 23 | 24 | 25 | class WebDriver(RemoteWebDriver): 26 | 27 | def __init__(self, executable_path='MicrosoftWebDriver.exe', 28 | capabilities=None, port=0): 29 | self.port = port 30 | if self.port == 0: 31 | self.port = utils.free_port() 32 | 33 | self.edge_service = Service(executable_path, port=self.port) 34 | self.edge_service.start() 35 | 36 | if capabilities is None: 37 | capabilities = DesiredCapabilities.EDGE 38 | 39 | RemoteWebDriver.__init__( 40 | self, 41 | command_executor=RemoteConnection('http://localhost:%d' % self.port, 42 | resolve_ip=False), 43 | desired_capabilities=capabilities) 44 | self._is_remote = False 45 | 46 | def quit(self): 47 | RemoteWebDriver.quit(self) 48 | self.edge_service.stop() 49 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/firefox/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/firefox/amd64/x_ignore_nofocus.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/firefox/amd64/x_ignore_nofocus.so -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/firefox/remote_connection.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from selenium.webdriver.remote.remote_connection import RemoteConnection 19 | 20 | class FirefoxRemoteConnection(RemoteConnection): 21 | 22 | def __init__(self, remote_server_addr, keep_alive=True): 23 | RemoteConnection.__init__(self, remote_server_addr, keep_alive) 24 | self._commands["SET_CONTEXT"] = ('POST', 25 | '/session/$sessionId/moz/context') 26 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/firefox/service.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from subprocess import PIPE 19 | 20 | from selenium.webdriver.common import service 21 | 22 | 23 | class Service(service.Service): 24 | """Object that manages the starting and stopping of the 25 | GeckoDriver.""" 26 | 27 | def __init__( 28 | self, executable_path, firefox_binary=None, port=0, service_args=None, 29 | log_path="geckodriver.log", env=None): 30 | """Creates a new instance of the GeckoDriver remote service proxy. 31 | 32 | GeckoDriver provides a HTTP interface speaking the W3C WebDriver 33 | protocol to Marionette. 34 | 35 | :param executable_path: Path to the GeckoDriver binary. 36 | :param firefox_binary: Optional path to the Firefox binary. 37 | :param port: Run the remote service on a specified port. 38 | Defaults to 0. 39 | :param service_args: Optional list of arguments to pass to the 40 | GeckoDriver binary. 41 | :param log_path: Optional path for the GeckoDriver to log to. 42 | Defaults to _geckodriver.log_ in the current working directory. 43 | :param env: Optional dictionary of output variables to expose 44 | in the services' environment. 45 | """ 46 | if log_path: 47 | log_file = open(log_path, "a+") 48 | 49 | service.Service.__init__( 50 | self, executable_path, port=port, log_file=log_file, env=env) 51 | self.firefox_binary = firefox_binary 52 | self.service_args = service_args or [] 53 | 54 | def command_line_args(self): 55 | if self.firefox_binary: 56 | return ["-b", self.firefox_binary, "--webdriver-port", "%d" % self.port] 57 | return ["--webdriver-port", "%d" % self.port] 58 | 59 | def send_remote_shutdown_command(self): 60 | pass 61 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/firefox/webdriver.xpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/firefox/webdriver.xpi -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/firefox/x86/x_ignore_nofocus.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/firefox/x86/x_ignore_nofocus.so -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/ie/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/ie/service.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | from selenium.webdriver.common import service 18 | 19 | class Service(service.Service): 20 | """ 21 | Object that manages the starting and stopping of the IEDriver 22 | """ 23 | 24 | def __init__(self, executable_path, port=0, host=None, log_level=None, log_file=None): 25 | """ 26 | Creates a new instance of the Service 27 | 28 | :Args: 29 | - executable_path : Path to the IEDriver 30 | - port : Port the service is running on 31 | - host : IP address the service port is bound 32 | - log_level : Level of logging of service, may be "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE". 33 | Default is "FATAL". 34 | - log_file : Target of logging of service, may be "stdout", "stderr" or file path. 35 | Default is "stdout".""" 36 | self.service_args = [] 37 | if host is not None: 38 | self.service_args.append("--host=%s" % host) 39 | if log_level is not None: 40 | self.service_args.append("--log-level=%s" % log_level) 41 | if log_file is not None: 42 | self.service_args.append("--log-file=%s" % log_file) 43 | 44 | service.Service.__init__(self, executable_path, port=port, 45 | start_error_message="Please download from http://selenium-release.storage.googleapis.com/index.html and read up at https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver") 46 | 47 | def command_line_args(self): 48 | return ["--port=%d" % self.port] + self.service_args 49 | 50 | 51 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/ie/webdriver.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from selenium.webdriver.common import utils 19 | from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver 20 | from selenium.webdriver.common.desired_capabilities import DesiredCapabilities 21 | from selenium.webdriver.remote.command import Command 22 | from selenium.common.exceptions import WebDriverException 23 | import base64 24 | from .service import Service 25 | 26 | DEFAULT_TIMEOUT = 30 27 | DEFAULT_PORT = 0 28 | DEFAULT_HOST = None 29 | DEFAULT_LOG_LEVEL = None 30 | DEFAULT_LOG_FILE = None 31 | 32 | class WebDriver(RemoteWebDriver): 33 | 34 | def __init__(self, executable_path='IEDriverServer.exe', capabilities=None, 35 | port=DEFAULT_PORT, timeout=DEFAULT_TIMEOUT, host=DEFAULT_HOST, 36 | log_level=DEFAULT_LOG_LEVEL, log_file=DEFAULT_LOG_FILE): 37 | self.port = port 38 | if self.port == 0: 39 | self.port = utils.free_port() 40 | self.host = host 41 | self.log_level = log_level 42 | self.log_file = log_file 43 | 44 | self.iedriver = Service(executable_path, port=self.port, 45 | host=self.host, log_level=self.log_level, log_file=self.log_file) 46 | 47 | self.iedriver.start() 48 | 49 | if capabilities is None: 50 | capabilities = DesiredCapabilities.INTERNETEXPLORER 51 | 52 | RemoteWebDriver.__init__( 53 | self, 54 | command_executor='http://localhost:%d' % self.port, 55 | desired_capabilities=capabilities) 56 | self._is_remote = False 57 | 58 | def quit(self): 59 | RemoteWebDriver.quit(self) 60 | self.iedriver.stop() 61 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/opera/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/phantomjs/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/phantomjs/service.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | import os 18 | import tempfile 19 | from selenium.webdriver.common import service 20 | 21 | 22 | class Service(service.Service): 23 | """ 24 | Object that manages the starting and stopping of PhantomJS / Ghostdriver 25 | """ 26 | 27 | def __init__(self, executable_path, port=0, service_args=None, log_path=None): 28 | """ 29 | Creates a new instance of the Service 30 | 31 | :Args: 32 | - executable_path : Path to PhantomJS binary 33 | - port : Port the service is running on 34 | - service_args : A List of other command line options to pass to PhantomJS 35 | - log_path: Path for PhantomJS service to log to 36 | """ 37 | self.service_args= service_args 38 | if self.service_args is None: 39 | self.service_args = [] 40 | else: 41 | self.service_args=service_args[:] 42 | if not log_path: 43 | log_path = "ghostdriver.log" 44 | if not self._args_contain("--cookies-file="): 45 | self._cookie_temp_file = tempfile.mkstemp()[1] 46 | self.service_args.append("--cookies-file=" + self._cookie_temp_file) 47 | else: 48 | self._cookie_temp_file = None 49 | 50 | service.Service.__init__(self, executable_path, port=port, log_file=open(log_path, 'w')) 51 | 52 | 53 | def _args_contain(self, arg): 54 | return len(list(filter(lambda x:x.startswith(arg), self.service_args))) > 0 55 | 56 | def command_line_args(self): 57 | return self.service_args + ["--webdriver=%d" % self.port] 58 | 59 | @property 60 | def service_url(self): 61 | """ 62 | Gets the url of the GhostDriver Service 63 | """ 64 | return "http://localhost:%d/wd/hub" % self.port 65 | 66 | def send_remote_shutdown_command(self): 67 | if self._cookie_temp_file: 68 | os.remove(self._cookie_temp_file) 69 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/remote/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/remote/file_detector.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | import abc 19 | import os 20 | from selenium.webdriver.common.utils import keys_to_typing 21 | 22 | 23 | class FileDetector(object): 24 | """ 25 | Used for identifying whether a sequence of chars represents the path to a 26 | file. 27 | """ 28 | __metaclass__ = abc.ABCMeta 29 | 30 | @abc.abstractmethod 31 | def is_local_file(self, *keys): 32 | return 33 | 34 | 35 | class UselessFileDetector(FileDetector): 36 | """ 37 | A file detector that never finds anything. 38 | """ 39 | def is_local_file(self, *keys): 40 | return None 41 | 42 | 43 | class LocalFileDetector(FileDetector): 44 | """ 45 | Detects files on the local disk. 46 | """ 47 | def is_local_file(self, *keys): 48 | file_path = ''.join(keys_to_typing(keys)) 49 | 50 | if not file_path: 51 | return None 52 | 53 | try: 54 | if os.path.isfile(file_path): 55 | return file_path 56 | except: 57 | pass 58 | return None 59 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/safari/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/support/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/support/abstract_event_listener.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | 19 | class AbstractEventListener(object): 20 | """ 21 | Event listener must subclass and implement this fully or partially 22 | """ 23 | 24 | def before_navigate_to(self, url, driver): pass 25 | 26 | def after_navigate_to(self, url, driver): pass 27 | 28 | def before_navigate_back(self, driver): pass 29 | 30 | def after_navigate_back(self, driver): pass 31 | 32 | def before_navigate_forward(self, driver): pass 33 | 34 | def after_navigate_forward(self, driver): pass 35 | 36 | def before_find(self, by, value, driver): pass 37 | 38 | def after_find(self, by, value, driver): pass 39 | 40 | def before_click(self, element, driver): pass 41 | 42 | def after_click(self, element, driver): pass 43 | 44 | def before_change_value_of(self, element, driver): pass 45 | 46 | def after_change_value_of(self, element, driver): pass 47 | 48 | def before_execute_script(self, script, driver): pass 49 | 50 | def after_execute_script(self, script, driver): pass 51 | 52 | def before_close(self, driver): pass 53 | 54 | def after_close(self, driver): pass 55 | 56 | def before_quit(self, driver): pass 57 | 58 | def after_quit(self, driver): pass 59 | 60 | def on_exception(self, exception, driver): pass 61 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/support/events.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from .abstract_event_listener import AbstractEventListener 19 | from .event_firing_webdriver import EventFiringWebDriver 20 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/selenium/webdriver/support/ui.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Software Freedom Conservancy (SFC) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The SFC licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from .select import Select 19 | from .wait import WebDriverWait 20 | 21 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/site.py: -------------------------------------------------------------------------------- 1 | def __boot(): 2 | import sys, imp, os, os.path 3 | PYTHONPATH = os.environ.get('PYTHONPATH') 4 | if PYTHONPATH is None or (sys.platform=='win32' and not PYTHONPATH): 5 | PYTHONPATH = [] 6 | else: 7 | PYTHONPATH = PYTHONPATH.split(os.pathsep) 8 | 9 | pic = getattr(sys,'path_importer_cache',{}) 10 | stdpath = sys.path[len(PYTHONPATH):] 11 | mydir = os.path.dirname(__file__) 12 | #print "searching",stdpath,sys.path 13 | 14 | for item in stdpath: 15 | if item==mydir or not item: 16 | continue # skip if current dir. on Windows, or my own directory 17 | importer = pic.get(item) 18 | if importer is not None: 19 | loader = importer.find_module('site') 20 | if loader is not None: 21 | # This should actually reload the current module 22 | loader.load_module('site') 23 | break 24 | else: 25 | try: 26 | stream, path, descr = imp.find_module('site',[item]) 27 | except ImportError: 28 | continue 29 | if stream is None: 30 | continue 31 | try: 32 | # This should actually reload the current module 33 | imp.load_module('site',stream,path,descr) 34 | finally: 35 | stream.close() 36 | break 37 | else: 38 | raise ImportError("Couldn't find the real 'site' module") 39 | 40 | #print "loaded", __file__ 41 | 42 | known_paths = dict([(makepath(item)[1],1) for item in sys.path]) # 2.2 comp 43 | 44 | oldpos = getattr(sys,'__egginsert',0) # save old insertion position 45 | sys.__egginsert = 0 # and reset the current one 46 | 47 | for item in PYTHONPATH: 48 | addsitedir(item) 49 | 50 | sys.__egginsert += oldpos # restore effective old position 51 | 52 | d,nd = makepath(stdpath[0]) 53 | insert_at = None 54 | new_path = [] 55 | 56 | for item in sys.path: 57 | p,np = makepath(item) 58 | 59 | if np==nd and insert_at is None: 60 | # We've hit the first 'system' path entry, so added entries go here 61 | insert_at = len(new_path) 62 | 63 | if np in known_paths or insert_at is None: 64 | new_path.append(item) 65 | else: 66 | # new path after the insert point, back-insert it 67 | new_path.insert(insert_at, item) 68 | insert_at += 1 69 | 70 | sys.path[:] = new_path 71 | 72 | if __name__=='site': 73 | __boot() 74 | del __boot 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/six-1.10.0-py2.6.egg-info/PKG-INFO: -------------------------------------------------------------------------------- 1 | Metadata-Version: 1.0 2 | Name: six 3 | Version: 1.10.0 4 | Summary: Python 2 and 3 compatibility utilities 5 | Home-page: http://pypi.python.org/pypi/six/ 6 | Author: Benjamin Peterson 7 | Author-email: benjamin@python.org 8 | License: MIT 9 | Description: Six is a Python 2 and 3 compatibility library. It provides utility functions 10 | for smoothing over the differences between the Python versions with the goal of 11 | writing Python code that is compatible on both Python versions. See the 12 | documentation for more information on what is provided. 13 | 14 | Six supports every Python version since 2.6. It is contained in only one Python 15 | file, so it can be easily copied into your project. (The copyright and license 16 | notice must be retained.) 17 | 18 | Online documentation is at https://pythonhosted.org/six/. 19 | 20 | Bugs can be reported to https://bitbucket.org/gutworth/six. The code can also 21 | be found there. 22 | 23 | For questions about six or porting in general, email the python-porting mailing 24 | list: https://mail.python.org/mailman/listinfo/python-porting 25 | 26 | Platform: UNKNOWN 27 | Classifier: Programming Language :: Python :: 2 28 | Classifier: Programming Language :: Python :: 3 29 | Classifier: Intended Audience :: Developers 30 | Classifier: License :: OSI Approved :: MIT License 31 | Classifier: Topic :: Software Development :: Libraries 32 | Classifier: Topic :: Utilities 33 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/six-1.10.0-py2.6.egg-info/SOURCES.txt: -------------------------------------------------------------------------------- 1 | CHANGES 2 | LICENSE 3 | MANIFEST.in 4 | README 5 | setup.cfg 6 | setup.py 7 | six.py 8 | test_six.py 9 | documentation/Makefile 10 | documentation/conf.py 11 | documentation/index.rst 12 | six.egg-info/PKG-INFO 13 | six.egg-info/SOURCES.txt 14 | six.egg-info/dependency_links.txt 15 | six.egg-info/top_level.txt -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/six-1.10.0-py2.6.egg-info/dependency_links.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/six-1.10.0-py2.6.egg-info/installed-files.txt: -------------------------------------------------------------------------------- 1 | ../six.py 2 | ../six.pyc 3 | . 4 | SOURCES.txt 5 | top_level.txt 6 | dependency_links.txt 7 | PKG-INFO 8 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/six-1.10.0-py2.6.egg-info/top_level.txt: -------------------------------------------------------------------------------- 1 | six 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/traceback2-1.4.0-py2.6.egg-info/PKG-INFO: -------------------------------------------------------------------------------- 1 | Metadata-Version: 1.0 2 | Name: traceback2 3 | Version: 1.4.0 4 | Summary: Backports of the traceback module 5 | Home-page: https://github.com/testing-cabal/traceback2 6 | Author: Testing-cabal 7 | Author-email: testing-cabal@lists.launchpad.net 8 | License: UNKNOWN 9 | Description: A backport of traceback to older supported Pythons. 10 | 11 | >>> import traceback2 as traceback 12 | 13 | Profit. 14 | 15 | Things to be aware of! 16 | 17 | In Python 2.x, unlike traceback, traceback2 creates unicode output (because it 18 | depends on the linecache2 module). 19 | 20 | Exception frame clearing silently does nothing if the interpreter in use does 21 | not support it. 22 | 23 | traceback2._some_str, which while not an official API is so old its likely in 24 | use behaves similarly to the Python3 version - objects where unicode(obj) fails 25 | but str(object) works will be shown as b'thestrvaluerepr'. 26 | 27 | 28 | Platform: UNKNOWN 29 | Classifier: Development Status :: 6 - Mature 30 | Classifier: Intended Audience :: Developers 31 | Classifier: License :: OSI Approved :: Python Software Foundation License 32 | Classifier: Operating System :: OS Independent 33 | Classifier: Programming Language :: Python 34 | Classifier: Programming Language :: Python :: 2 35 | Classifier: Programming Language :: Python :: 2.6 36 | Classifier: Programming Language :: Python :: 2.7 37 | Classifier: Programming Language :: Python :: 3 38 | Classifier: Programming Language :: Python :: 3.2 39 | Classifier: Programming Language :: Python :: 3.3 40 | Classifier: Programming Language :: Python :: 3.4 41 | Classifier: Topic :: Software Development 42 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/traceback2-1.4.0-py2.6.egg-info/SOURCES.txt: -------------------------------------------------------------------------------- 1 | .testr.conf 2 | AUTHORS 3 | ChangeLog 4 | Makefile 5 | README.rst 6 | requirements.txt 7 | setup.cfg 8 | setup.py 9 | test-requirements.txt 10 | traceback2/__init__.py 11 | traceback2.egg-info/PKG-INFO 12 | traceback2.egg-info/SOURCES.txt 13 | traceback2.egg-info/dependency_links.txt 14 | traceback2.egg-info/not-zip-safe 15 | traceback2.egg-info/pbr.json 16 | traceback2.egg-info/requires.txt 17 | traceback2.egg-info/top_level.txt 18 | traceback2/tests/__init__.py 19 | traceback2/tests/test_traceback.py -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/traceback2-1.4.0-py2.6.egg-info/dependency_links.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/traceback2-1.4.0-py2.6.egg-info/installed-files.txt: -------------------------------------------------------------------------------- 1 | ../traceback2/tests/test_traceback.py 2 | ../traceback2/tests/__init__.py 3 | ../traceback2/__init__.py 4 | ../traceback2/tests/test_traceback.pyc 5 | ../traceback2/tests/__init__.pyc 6 | ../traceback2/__init__.pyc 7 | . 8 | pbr.json 9 | SOURCES.txt 10 | top_level.txt 11 | dependency_links.txt 12 | requires.txt 13 | not-zip-safe 14 | PKG-INFO 15 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/traceback2-1.4.0-py2.6.egg-info/not-zip-safe: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/traceback2-1.4.0-py2.6.egg-info/pbr.json: -------------------------------------------------------------------------------- 1 | {"git_version": "37c5f15", "is_release": true} -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/traceback2-1.4.0-py2.6.egg-info/requires.txt: -------------------------------------------------------------------------------- 1 | linecache2 -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/traceback2-1.4.0-py2.6.egg-info/top_level.txt: -------------------------------------------------------------------------------- 1 | traceback2 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/traceback2/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/webapp/src/test/resources/lib/python2.6/site-packages/traceback2/tests/__init__.py -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/unittest2-1.1.0-py2.6.egg-info/SOURCES.txt: -------------------------------------------------------------------------------- 1 | README.txt 2 | setup.cfg 3 | setup.py 4 | unittest2/__init__.py 5 | unittest2/__main__.py 6 | unittest2/case.py 7 | unittest2/collector.py 8 | unittest2/compatibility.py 9 | unittest2/loader.py 10 | unittest2/main.py 11 | unittest2/result.py 12 | unittest2/runner.py 13 | unittest2/signals.py 14 | unittest2/suite.py 15 | unittest2/util.py 16 | unittest2.egg-info/PKG-INFO 17 | unittest2.egg-info/SOURCES.txt 18 | unittest2.egg-info/dependency_links.txt 19 | unittest2.egg-info/entry_points.txt 20 | unittest2.egg-info/requires.txt 21 | unittest2.egg-info/top_level.txt 22 | unittest2/test/__init__.py 23 | unittest2/test/_test_unittest2_with.py 24 | unittest2/test/dummy.py 25 | unittest2/test/support.py 26 | unittest2/test/test_assertions.py 27 | unittest2/test/test_break.py 28 | unittest2/test/test_case.py 29 | unittest2/test/test_discovery.py 30 | unittest2/test/test_functiontestcase.py 31 | unittest2/test/test_loader.py 32 | unittest2/test/test_new_tests.py 33 | unittest2/test/test_program.py 34 | unittest2/test/test_result.py 35 | unittest2/test/test_runner.py 36 | unittest2/test/test_setups.py 37 | unittest2/test/test_skipping.py 38 | unittest2/test/test_suite.py 39 | unittest2/test/test_unittest2_with.py -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/unittest2-1.1.0-py2.6.egg-info/dependency_links.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/unittest2-1.1.0-py2.6.egg-info/entry_points.txt: -------------------------------------------------------------------------------- 1 | [console_scripts] 2 | unit2 = unittest2.__main__:main_ 3 | 4 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/unittest2-1.1.0-py2.6.egg-info/installed-files.txt: -------------------------------------------------------------------------------- 1 | ../unittest2/main.py 2 | ../unittest2/loader.py 3 | ../unittest2/util.py 4 | ../unittest2/signals.py 5 | ../unittest2/suite.py 6 | ../unittest2/result.py 7 | ../unittest2/case.py 8 | ../unittest2/compatibility.py 9 | ../unittest2/runner.py 10 | ../unittest2/__main__.py 11 | ../unittest2/collector.py 12 | ../unittest2/__init__.py 13 | ../unittest2/test/test_loader.py 14 | ../unittest2/test/test_case.py 15 | ../unittest2/test/test_suite.py 16 | ../unittest2/test/test_functiontestcase.py 17 | ../unittest2/test/test_runner.py 18 | ../unittest2/test/test_skipping.py 19 | ../unittest2/test/test_assertions.py 20 | ../unittest2/test/test_program.py 21 | ../unittest2/test/test_result.py 22 | ../unittest2/test/test_discovery.py 23 | ../unittest2/test/test_break.py 24 | ../unittest2/test/test_new_tests.py 25 | ../unittest2/test/test_unittest2_with.py 26 | ../unittest2/test/support.py 27 | ../unittest2/test/dummy.py 28 | ../unittest2/test/_test_unittest2_with.py 29 | ../unittest2/test/__init__.py 30 | ../unittest2/test/test_setups.py 31 | ../unittest2/main.pyc 32 | ../unittest2/loader.pyc 33 | ../unittest2/util.pyc 34 | ../unittest2/signals.pyc 35 | ../unittest2/suite.pyc 36 | ../unittest2/result.pyc 37 | ../unittest2/case.pyc 38 | ../unittest2/compatibility.pyc 39 | ../unittest2/runner.pyc 40 | ../unittest2/__main__.pyc 41 | ../unittest2/collector.pyc 42 | ../unittest2/__init__.pyc 43 | ../unittest2/test/test_loader.pyc 44 | ../unittest2/test/test_case.pyc 45 | ../unittest2/test/test_suite.pyc 46 | ../unittest2/test/test_functiontestcase.pyc 47 | ../unittest2/test/test_runner.pyc 48 | ../unittest2/test/test_skipping.pyc 49 | ../unittest2/test/test_assertions.pyc 50 | ../unittest2/test/test_program.pyc 51 | ../unittest2/test/test_result.pyc 52 | ../unittest2/test/test_discovery.pyc 53 | ../unittest2/test/test_break.pyc 54 | ../unittest2/test/test_new_tests.pyc 55 | ../unittest2/test/test_unittest2_with.pyc 56 | ../unittest2/test/support.pyc 57 | ../unittest2/test/dummy.pyc 58 | ../unittest2/test/_test_unittest2_with.pyc 59 | ../unittest2/test/__init__.pyc 60 | ../unittest2/test/test_setups.pyc 61 | . 62 | SOURCES.txt 63 | top_level.txt 64 | dependency_links.txt 65 | entry_points.txt 66 | requires.txt 67 | PKG-INFO 68 | ../../../../bin/unit2 69 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/unittest2-1.1.0-py2.6.egg-info/requires.txt: -------------------------------------------------------------------------------- 1 | argparse 2 | six>=1.4 3 | traceback2 -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/unittest2-1.1.0-py2.6.egg-info/top_level.txt: -------------------------------------------------------------------------------- 1 | unittest2 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/unittest2/__main__.py: -------------------------------------------------------------------------------- 1 | """Main entry point""" 2 | 3 | import sys 4 | if sys.argv[0].endswith("__main__.py"): 5 | import os.path 6 | # We change sys.argv[0] to make help message more useful 7 | # use executable without path, unquoted 8 | # (it's just a hint anyway) 9 | # (if you have spaces in your executable you get what you deserve!) 10 | executable = os.path.basename(sys.executable) 11 | sys.argv[0] = executable + " -m unittest2" 12 | del os 13 | 14 | __unittest = True 15 | 16 | from unittest2.main import main, TestProgram 17 | def main_(): 18 | main(module=None) 19 | 20 | if __name__=="__main__": 21 | main_() 22 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/unittest2/collector.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | from unittest2.loader import defaultTestLoader 4 | 5 | def collector(): 6 | # import __main__ triggers code re-execution 7 | __main__ = sys.modules['__main__'] 8 | setupDir = os.path.abspath(os.path.dirname(__main__.__file__)) 9 | return defaultTestLoader.discover(setupDir) 10 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/unittest2/signals.py: -------------------------------------------------------------------------------- 1 | import signal 2 | import weakref 3 | 4 | from unittest2.compatibility import wraps 5 | 6 | __unittest = True 7 | 8 | 9 | class _InterruptHandler(object): 10 | def __init__(self, default_handler): 11 | self.called = False 12 | self.original_handler = default_handler 13 | if isinstance(default_handler, int): 14 | if default_handler == signal.SIG_DFL: 15 | # Pretend it's signal.default_int_handler instead. 16 | default_handler = signal.default_int_handler 17 | elif default_handler == signal.SIG_IGN: 18 | # Not quite the same thing as SIG_IGN, but the closest we 19 | # can make it: do nothing. 20 | def default_handler(unused_signum, unused_frame): 21 | pass 22 | else: 23 | raise TypeError("expected SIGINT signal handler to be " 24 | "signal.SIG_IGN, signal.SIG_DFL, or a " 25 | "callable object") 26 | self.default_handler = default_handler 27 | 28 | def __call__(self, signum, frame): 29 | installed_handler = signal.getsignal(signal.SIGINT) 30 | if installed_handler is not self: 31 | # if we aren't the installed handler, then delegate immediately 32 | # to the default handler 33 | self.default_handler(signum, frame) 34 | 35 | if self.called: 36 | self.default_handler(signum, frame) 37 | self.called = True 38 | for result in _results.keys(): 39 | result.stop() 40 | 41 | _results = weakref.WeakKeyDictionary() 42 | def registerResult(result): 43 | _results[result] = 1 44 | 45 | def removeResult(result): 46 | return bool(_results.pop(result, None)) 47 | 48 | _interrupt_handler = None 49 | def installHandler(): 50 | global _interrupt_handler 51 | if _interrupt_handler is None: 52 | default_handler = signal.getsignal(signal.SIGINT) 53 | _interrupt_handler = _InterruptHandler(default_handler) 54 | signal.signal(signal.SIGINT, _interrupt_handler) 55 | 56 | 57 | def removeHandler(method=None): 58 | if method is not None: 59 | @wraps(method) 60 | def inner(*args, **kwargs): 61 | initial = signal.getsignal(signal.SIGINT) 62 | removeHandler() 63 | try: 64 | return method(*args, **kwargs) 65 | finally: 66 | signal.signal(signal.SIGINT, initial) 67 | return inner 68 | 69 | global _interrupt_handler 70 | if _interrupt_handler is not None: 71 | signal.signal(signal.SIGINT, _interrupt_handler.original_handler) 72 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/unittest2/test/__init__.py: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/unittest2/test/dummy.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/webapp/src/test/resources/lib/python2.6/site-packages/unittest2/test/dummy.py -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/unittest2/test/test_new_tests.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from six.moves import StringIO 4 | 5 | import unittest2 6 | from unittest2.test.support import resultFactory 7 | 8 | 9 | class TestUnittest(unittest2.TestCase): 10 | 11 | def assertIsSubclass(self, actual, klass): 12 | self.assertTrue(issubclass(actual, klass), "Not a subclass.") 13 | 14 | def testInheritance(self): 15 | self.assertIsSubclass(unittest2.TestCase, unittest.TestCase) 16 | self.assertIsSubclass(unittest2.TestResult, unittest.TestResult) 17 | self.assertIsSubclass(unittest2.TestSuite, unittest.TestSuite) 18 | self.assertIsSubclass(unittest2.TextTestRunner, unittest.TextTestRunner) 19 | self.assertIsSubclass(unittest2.TestLoader, unittest.TestLoader) 20 | self.assertIsSubclass(unittest2.TextTestResult, unittest.TestResult) 21 | 22 | def test_new_runner_old_case(self): 23 | runner = unittest2.TextTestRunner(resultclass=resultFactory, 24 | stream=StringIO()) 25 | class Test(unittest.TestCase): 26 | def testOne(self): 27 | pass 28 | suite = unittest2.TestSuite((Test('testOne'),)) 29 | result = runner.run(suite) 30 | self.assertEqual(result.testsRun, 1) 31 | self.assertEqual(len(result.errors), 0) 32 | 33 | def test_old_runner_new_case(self): 34 | runner = unittest.TextTestRunner(stream=StringIO()) 35 | class Test(unittest2.TestCase): 36 | def testOne(self): 37 | self.assertDictEqual({}, {}) 38 | 39 | suite = unittest.TestSuite((Test('testOne'),)) 40 | result = runner.run(suite) 41 | self.assertEqual(result.testsRun, 1) 42 | self.assertEqual(len(result.errors), 0) 43 | 44 | def test_multiple_inheritance_setup(self): 45 | test = self 46 | test.setup_called = False 47 | test.teardown_called = False 48 | 49 | class OtherOther(unittest2.TestCase): 50 | def setUp(self): 51 | test.setup_called = True 52 | super(OtherOther, self).setUp() 53 | def tearDown(self): 54 | test.teardown_called = True 55 | super(OtherOther, self).setUp() 56 | 57 | class Other(unittest2.TestCase): 58 | pass 59 | 60 | class Both(Other, OtherOther): 61 | pass 62 | 63 | Both('assert_').setUp() 64 | Both('assert_').tearDown() 65 | self.assertTrue(test.setup_called) 66 | self.assertTrue(test.teardown_called) 67 | 68 | 69 | if __name__ == '__main__': 70 | unittest2.main() 71 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/unittest2/test/test_unittest2_with.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | import unittest2 4 | 5 | if sys.version_info[:2] >= (2, 5): 6 | from unittest2.test._test_unittest2_with import * 7 | else: 8 | 9 | class TestWith(unittest2.TestCase): 10 | 11 | @unittest2.skip('tests using with statement skipped on Python 2.4') 12 | def testWith(self): 13 | pass 14 | 15 | 16 | if __name__ == '__main__': 17 | unittest2.main() -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/urllib3-1.15.1.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/urllib3-1.15.1.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.24.0) 3 | Root-Is-Purelib: true 4 | Tag: py2-none-any 5 | Tag: py3-none-any 6 | 7 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/urllib3-1.15.1.dist-info/metadata.json: -------------------------------------------------------------------------------- 1 | {"run_requires": [{"extra": "secure", "requires": ["certifi"]}, {"environment": "python_version<=\"2.7\"", "extra": "secure", "requires": ["pyOpenSSL>=0.13", "ndg-httpsclient", "pyasn1"]}], "generator": "bdist_wheel (0.24.0)", "keywords": ["urllib", "httplib", "threadsafe", "filepost", "http", "https", "ssl", "pooling"], "version": "1.15.1", "extras": ["secure"], "classifiers": ["Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries"], "summary": "HTTP library with thread-safe connection pooling, file post, and more.", "license": "MIT", "metadata_version": "2.0", "extensions": {"python.details": {"contacts": [{"role": "author", "email": "andrey.petrov@shazow.net", "name": "Andrey Petrov"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "http://urllib3.readthedocs.org/"}}}, "test_requires": [{"requires": ["nose", "mock", "tornado"]}], "name": "urllib3"} -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/urllib3-1.15.1.dist-info/pbr.json: -------------------------------------------------------------------------------- 1 | {"is_release": false, "git_version": "27df29b"} -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/urllib3-1.15.1.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | urllib3 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/urllib3/contrib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/webapp/src/test/resources/lib/python2.6/site-packages/urllib3/contrib/__init__.py -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/urllib3/filepost.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | import codecs 3 | 4 | from uuid import uuid4 5 | from io import BytesIO 6 | 7 | from .packages import six 8 | from .packages.six import b 9 | from .fields import RequestField 10 | 11 | writer = codecs.lookup('utf-8')[3] 12 | 13 | 14 | def choose_boundary(): 15 | """ 16 | Our embarassingly-simple replacement for mimetools.choose_boundary. 17 | """ 18 | return uuid4().hex 19 | 20 | 21 | def iter_field_objects(fields): 22 | """ 23 | Iterate over fields. 24 | 25 | Supports list of (k, v) tuples and dicts, and lists of 26 | :class:`~urllib3.fields.RequestField`. 27 | 28 | """ 29 | if isinstance(fields, dict): 30 | i = six.iteritems(fields) 31 | else: 32 | i = iter(fields) 33 | 34 | for field in i: 35 | if isinstance(field, RequestField): 36 | yield field 37 | else: 38 | yield RequestField.from_tuples(*field) 39 | 40 | 41 | def iter_fields(fields): 42 | """ 43 | .. deprecated:: 1.6 44 | 45 | Iterate over fields. 46 | 47 | The addition of :class:`~urllib3.fields.RequestField` makes this function 48 | obsolete. Instead, use :func:`iter_field_objects`, which returns 49 | :class:`~urllib3.fields.RequestField` objects. 50 | 51 | Supports list of (k, v) tuples and dicts. 52 | """ 53 | if isinstance(fields, dict): 54 | return ((k, v) for k, v in six.iteritems(fields)) 55 | 56 | return ((k, v) for k, v in fields) 57 | 58 | 59 | def encode_multipart_formdata(fields, boundary=None): 60 | """ 61 | Encode a dictionary of ``fields`` using the multipart/form-data MIME format. 62 | 63 | :param fields: 64 | Dictionary of fields or list of (key, :class:`~urllib3.fields.RequestField`). 65 | 66 | :param boundary: 67 | If not specified, then a random boundary will be generated using 68 | :func:`mimetools.choose_boundary`. 69 | """ 70 | body = BytesIO() 71 | if boundary is None: 72 | boundary = choose_boundary() 73 | 74 | for field in iter_field_objects(fields): 75 | body.write(b('--%s\r\n' % (boundary))) 76 | 77 | writer(body).write(field.render_headers()) 78 | data = field.data 79 | 80 | if isinstance(data, int): 81 | data = str(data) # Backwards compatibility 82 | 83 | if isinstance(data, six.text_type): 84 | writer(body).write(data) 85 | else: 86 | body.write(data) 87 | 88 | body.write(b'\r\n') 89 | 90 | body.write(b('--%s--\r\n' % (boundary))) 91 | 92 | content_type = str('multipart/form-data; boundary=%s' % boundary) 93 | 94 | return body.getvalue(), content_type 95 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/urllib3/packages/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from . import ssl_match_hostname 4 | 5 | __all__ = ('ssl_match_hostname', ) 6 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/urllib3/packages/backports/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boozallen/devsecops-example-helloworld/697f0c8f0595790bb1522b288b05fc32ca63f3b5/webapp/src/test/resources/lib/python2.6/site-packages/urllib3/packages/backports/__init__.py -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/urllib3/packages/backports/makefile.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | backports.makefile 4 | ~~~~~~~~~~~~~~~~~~ 5 | 6 | Backports the Python 3 ``socket.makefile`` method for use with anything that 7 | wants to create a "fake" socket object. 8 | """ 9 | import io 10 | 11 | from socket import SocketIO 12 | 13 | 14 | def backport_makefile(self, mode="r", buffering=None, encoding=None, 15 | errors=None, newline=None): 16 | """ 17 | Backport of ``socket.makefile`` from Python 3.5. 18 | """ 19 | if not set(mode) <= set(["r", "w", "b"]): 20 | raise ValueError( 21 | "invalid mode %r (only r, w, b allowed)" % (mode,) 22 | ) 23 | writing = "w" in mode 24 | reading = "r" in mode or not writing 25 | assert reading or writing 26 | binary = "b" in mode 27 | rawmode = "" 28 | if reading: 29 | rawmode += "r" 30 | if writing: 31 | rawmode += "w" 32 | raw = SocketIO(self, rawmode) 33 | self._makefile_refs += 1 34 | if buffering is None: 35 | buffering = -1 36 | if buffering < 0: 37 | buffering = io.DEFAULT_BUFFER_SIZE 38 | if buffering == 0: 39 | if not binary: 40 | raise ValueError("unbuffered streams must be binary") 41 | return raw 42 | if reading and writing: 43 | buffer = io.BufferedRWPair(raw, raw, buffering) 44 | elif reading: 45 | buffer = io.BufferedReader(raw, buffering) 46 | else: 47 | assert writing 48 | buffer = io.BufferedWriter(raw, buffering) 49 | if binary: 50 | return buffer 51 | text = io.TextIOWrapper(buffer, encoding, errors, newline) 52 | text.mode = mode 53 | return text 54 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/urllib3/packages/ssl_match_hostname/__init__.py: -------------------------------------------------------------------------------- 1 | try: 2 | # Python 3.2+ 3 | from ssl import CertificateError, match_hostname 4 | except ImportError: 5 | try: 6 | # Backport of the function from a pypi module 7 | from backports.ssl_match_hostname import CertificateError, match_hostname 8 | except ImportError: 9 | # Our vendored copy 10 | from ._implementation import CertificateError, match_hostname 11 | 12 | # Not needed, but documenting what we provide. 13 | __all__ = ('CertificateError', 'match_hostname') 14 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/urllib3/util/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | # For backwards compatibility, provide imports that used to be here. 3 | from .connection import is_connection_dropped 4 | from .request import make_headers 5 | from .response import is_fp_closed 6 | from .ssl_ import ( 7 | SSLContext, 8 | HAS_SNI, 9 | IS_PYOPENSSL, 10 | assert_fingerprint, 11 | resolve_cert_reqs, 12 | resolve_ssl_version, 13 | ssl_wrap_socket, 14 | ) 15 | from .timeout import ( 16 | current_time, 17 | Timeout, 18 | ) 19 | 20 | from .retry import Retry 21 | from .url import ( 22 | get_host, 23 | parse_url, 24 | split_first, 25 | Url, 26 | ) 27 | 28 | __all__ = ( 29 | 'HAS_SNI', 30 | 'IS_PYOPENSSL', 31 | 'SSLContext', 32 | 'Retry', 33 | 'Timeout', 34 | 'Url', 35 | 'assert_fingerprint', 36 | 'current_time', 37 | 'is_connection_dropped', 38 | 'is_fp_closed', 39 | 'get_host', 40 | 'parse_url', 41 | 'make_headers', 42 | 'resolve_cert_reqs', 43 | 'resolve_ssl_version', 44 | 'split_first', 45 | 'ssl_wrap_socket', 46 | ) 47 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/urllib3/util/request.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from base64 import b64encode 3 | 4 | from ..packages.six import b 5 | 6 | ACCEPT_ENCODING = 'gzip,deflate' 7 | 8 | 9 | def make_headers(keep_alive=None, accept_encoding=None, user_agent=None, 10 | basic_auth=None, proxy_basic_auth=None, disable_cache=None): 11 | """ 12 | Shortcuts for generating request headers. 13 | 14 | :param keep_alive: 15 | If ``True``, adds 'connection: keep-alive' header. 16 | 17 | :param accept_encoding: 18 | Can be a boolean, list, or string. 19 | ``True`` translates to 'gzip,deflate'. 20 | List will get joined by comma. 21 | String will be used as provided. 22 | 23 | :param user_agent: 24 | String representing the user-agent you want, such as 25 | "python-urllib3/0.6" 26 | 27 | :param basic_auth: 28 | Colon-separated username:password string for 'authorization: basic ...' 29 | auth header. 30 | 31 | :param proxy_basic_auth: 32 | Colon-separated username:password string for 'proxy-authorization: basic ...' 33 | auth header. 34 | 35 | :param disable_cache: 36 | If ``True``, adds 'cache-control: no-cache' header. 37 | 38 | Example:: 39 | 40 | >>> make_headers(keep_alive=True, user_agent="Batman/1.0") 41 | {'connection': 'keep-alive', 'user-agent': 'Batman/1.0'} 42 | >>> make_headers(accept_encoding=True) 43 | {'accept-encoding': 'gzip,deflate'} 44 | """ 45 | headers = {} 46 | if accept_encoding: 47 | if isinstance(accept_encoding, str): 48 | pass 49 | elif isinstance(accept_encoding, list): 50 | accept_encoding = ','.join(accept_encoding) 51 | else: 52 | accept_encoding = ACCEPT_ENCODING 53 | headers['accept-encoding'] = accept_encoding 54 | 55 | if user_agent: 56 | headers['user-agent'] = user_agent 57 | 58 | if keep_alive: 59 | headers['connection'] = 'keep-alive' 60 | 61 | if basic_auth: 62 | headers['authorization'] = 'Basic ' + \ 63 | b64encode(b(basic_auth)).decode('utf-8') 64 | 65 | if proxy_basic_auth: 66 | headers['proxy-authorization'] = 'Basic ' + \ 67 | b64encode(b(proxy_basic_auth)).decode('utf-8') 68 | 69 | if disable_cache: 70 | headers['cache-control'] = 'no-cache' 71 | 72 | return headers 73 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/urllib3/util/response.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from ..packages.six.moves import http_client as httplib 3 | 4 | from ..exceptions import HeaderParsingError 5 | 6 | 7 | def is_fp_closed(obj): 8 | """ 9 | Checks whether a given file-like object is closed. 10 | 11 | :param obj: 12 | The file-like object to check. 13 | """ 14 | 15 | try: 16 | # Check via the official file-like-object way. 17 | return obj.closed 18 | except AttributeError: 19 | pass 20 | 21 | try: 22 | # Check if the object is a container for another file-like object that 23 | # gets released on exhaustion (e.g. HTTPResponse). 24 | return obj.fp is None 25 | except AttributeError: 26 | pass 27 | 28 | raise ValueError("Unable to determine whether fp is closed.") 29 | 30 | 31 | def assert_header_parsing(headers): 32 | """ 33 | Asserts whether all headers have been successfully parsed. 34 | Extracts encountered errors from the result of parsing headers. 35 | 36 | Only works on Python 3. 37 | 38 | :param headers: Headers to verify. 39 | :type headers: `httplib.HTTPMessage`. 40 | 41 | :raises urllib3.exceptions.HeaderParsingError: 42 | If parsing errors are found. 43 | """ 44 | 45 | # This will fail silently if we pass in the wrong kind of parameter. 46 | # To make debugging easier add an explicit check. 47 | if not isinstance(headers, httplib.HTTPMessage): 48 | raise TypeError('expected httplib.Message, got {0}.'.format( 49 | type(headers))) 50 | 51 | defects = getattr(headers, 'defects', None) 52 | get_payload = getattr(headers, 'get_payload', None) 53 | 54 | unparsed_data = None 55 | if get_payload: # Platform-specific: Python 3. 56 | unparsed_data = get_payload() 57 | 58 | if defects or unparsed_data: 59 | raise HeaderParsingError(defects=defects, unparsed_data=unparsed_data) 60 | 61 | 62 | def is_response_to_head(response): 63 | """ 64 | Checks whether the request of a response has been a HEAD-request. 65 | Handles the quirks of AppEngine. 66 | 67 | :param conn: 68 | :type conn: :class:`httplib.HTTPResponse` 69 | """ 70 | # FIXME: Can we do this somehow without accessing private httplib _method? 71 | method = response._method 72 | if isinstance(method, int): # Platform-specific: Appengine 73 | return method == 3 74 | return method.upper() == 'HEAD' 75 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/xmlrunner-1.7.7-py2.6.egg-info/PKG-INFO: -------------------------------------------------------------------------------- 1 | Metadata-Version: 1.1 2 | Name: xmlrunner 3 | Version: 1.7.7 4 | Summary: PyUnit-based test runner with JUnit like XML reporting. 5 | Home-page: https://github.com/pycontribs/xmlrunner 6 | Author: Daniel Fernandes Martins 7 | Author-email: daniel.tritone@gmail.com 8 | License: LGPL 9 | Description: UNKNOWN 10 | Keywords: pyunit,unittest,junit xml,report,testrunner 11 | Platform: Any 12 | Classifier: Development Status :: 5 - Production/Stable 13 | Classifier: Intended Audience :: Developers 14 | Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) 15 | Classifier: Natural Language :: English 16 | Classifier: Operating System :: OS Independent 17 | Classifier: Programming Language :: Python 18 | Classifier: Programming Language :: Python :: 2 19 | Classifier: Programming Language :: Python :: 3 20 | Classifier: Topic :: Software Development :: Libraries :: Python Modules 21 | Classifier: Topic :: Software Development :: Testing 22 | Provides: xmlrunner 23 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/xmlrunner-1.7.7-py2.6.egg-info/SOURCES.txt: -------------------------------------------------------------------------------- 1 | setup.cfg 2 | setup.py 3 | xmlrunner/__init__.py 4 | xmlrunner/version.py 5 | xmlrunner/xmlrunner.py 6 | xmlrunner.egg-info/PKG-INFO 7 | xmlrunner.egg-info/SOURCES.txt 8 | xmlrunner.egg-info/dependency_links.txt 9 | xmlrunner.egg-info/top_level.txt 10 | xmlrunner.egg-info/zip-safe -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/xmlrunner-1.7.7-py2.6.egg-info/dependency_links.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/xmlrunner-1.7.7-py2.6.egg-info/installed-files.txt: -------------------------------------------------------------------------------- 1 | ../xmlrunner/version.py 2 | ../xmlrunner/xmlrunner.py 3 | ../xmlrunner/__init__.py 4 | ../xmlrunner/version.pyc 5 | ../xmlrunner/xmlrunner.pyc 6 | ../xmlrunner/__init__.pyc 7 | . 8 | SOURCES.txt 9 | top_level.txt 10 | dependency_links.txt 11 | zip-safe 12 | PKG-INFO 13 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/xmlrunner-1.7.7-py2.6.egg-info/top_level.txt: -------------------------------------------------------------------------------- 1 | xmlrunner 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/xmlrunner-1.7.7-py2.6.egg-info/zip-safe: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/xmlrunner/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | from .xmlrunner import XMLTestRunner 4 | 5 | -------------------------------------------------------------------------------- /webapp/src/test/resources/lib/python2.6/site-packages/xmlrunner/version.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | xmlrunner.version 4 | ~~~~~~~~~~~~~~~~~ 5 | 6 | Runtime library version information. 7 | 8 | :codeauthor: :email:`PyContribs (pycontribs@googlegroups.com)` 9 | :copyright: © 2013 Pedro Algarvio. 10 | :copyright: © 2014 Sorin Sbarnea. 11 | 12 | :license: LGPL, see LICENSE for more details. 13 | """ 14 | 15 | __version_info__ = (1, 7, 7) 16 | __version__ = '.'.join(map(str, __version_info__)) 17 | --------------------------------------------------------------------------------