File: base_test.py

package info (click to toggle)
weevely 4.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,336 kB
  • sloc: python: 7,732; php: 1,035; sh: 53; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 428 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from unittest import TestCase
from . import config
from os import environ


class BaseTest(TestCase):
    agent = environ.get('AGENT', 'agent.php')
    url = config.base_url + agent
    password = config.password
    path = config.base_folder + agent

    def shortDescription(self):
        doc = super().shortDescription()
        doc = doc if doc else ''
        return f'[PHP{8 if self.agent == "agent.phar" else 7}] {doc}'