Completed
Push — master ( a1e8f3...b95acc )
by Oleksandr
02:23
created

Proxy

Complexity

Total Complexity 0

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 0
c 1
b 0
f 0
dl 0
loc 16
ccs 4
cts 4
cp 1
1
# coding: utf-8
2
3 1
from schematics.models import Model
4 1
from schematics.types import StringType, IntType
5 1
from schematics.types.compound import ModelType
6
7
8 1
class Proxy(Model):
9 1
    host = StringType(
10
        default="",
11
        required=True,
12
    )
13 1
    port = IntType(
14
        default=1080,
15
        required=True,
16
    )
17 1
    user = StringType(
18
        default="",
19
        required=True,
20
    )
21
    password = StringType(
22
        default="",
23
        required=True,
24
    )
25
26
27 1 View Code Duplication
class Connection(Model):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
28 1
    host = StringType(
29
        default="",
30
        required=True,
31
    )
32 1
    port = IntType(
33
        min_value=1000,
34
        max_value=65000,
35
        default=21000,
36
        required=True,
37
    )
38 1
    max_clients = IntType(
39
        min_value=1,
40
        max_value=128,
41
        default=8,
42
        required=True,
43
    )
44 1
    throughput = IntType(
45
        min_value=300,
46
        max_value=1000000,
47
        default=5000,
48
        required=True,
49
    )
50 1
    proxy = ModelType(
51
        model_spec=Proxy,
52
        required=True,
53
    )
54