-
Notifications
You must be signed in to change notification settings - Fork 1
/
test_interfaces.py
51 lines (35 loc) · 1.03 KB
/
test_interfaces.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
class IEntity():
id=None
class IHasNameEntity():
name = None
class IHasSurnameEntity():
surname = None
class IHasDesctiptionEntity():
description = None
class IHasAgeEntity():
age=0
class INamePayload:
pass
class ISurnamePayload:
pass
class IDescriptionPayload:
pass
class IHasAgePayload():
age=0
class Entity1(IEntity,IHasNameEntity,IHasSurnameEntity):
name=None
class Entity2(IEntity,IHasNameEntity,IHasSurnameEntity,IHasDesctiptionEntity):
pass
class Entity3(IEntity,IHasNameEntity,IHasSurnameEntity,IHasDesctiptionEntity,IHasAgeEntity):
pass
class Payload1(INamePayload,ISurnamePayload):
def __init__(self,name,surname,description=None):
self.name = name
self.surname = surname
self.description = description
class Payload2(INamePayload,ISurnamePayload,IDescriptionPayload,IHasAgePayload):
def __init__(self,name,surname,description,age=0):
self.name = name
self.surname = surname
self.description = description
self.age = age