Passed
Push — master ( 4e1ee8...ad69f1 )
by Yu
02:23 queued 10s
created

UploadModel.__init__()   A

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 3
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nop 2
crap 1
1
"""Provides Rest API models
2
"""
3
4 1
import datetime
5
6
7 1
class StatusModel:
8
    """Status Model"""
9
10 1
    def __init__(self, status, version):
11 1
        self.status = status
12 1
        self.version = version
13
14
15 1
class UploadModel:
16
    """Upload_id Model"""
17
18 1
    def __init__(self, upload_id):
19 1
        self.upload_id = str(upload_id)
20 1
        self.release_date = datetime.datetime.now()
21
22
23 1
class ErrorModel:
24
    """Error Model"""
25
26 1
    def __init__(self, error):
27 1
        self.error = str(error)
28 1
        self.errorDate = datetime.datetime.now()
29
30
31 1
class FileNotFoundModel:
32
    """FileNotFound Model"""
33
34 1
    def __init__(self, reason):
35 1
        self.reason = reason
36
        self.errorDate = datetime.datetime.now()
37