Completed
Push — master ( d51337...e3afa2 )
by Allisson
01:33
created

product_data()   A

Complexity

Conditions 1

Size

Total Lines 23

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 23
rs 9.0856
1
import os
2
3
import pytest
4
5
from vindi.api import get_api_instance
6
7
8
@pytest.fixture
9
def api():
10
    return get_api_instance(token=os.getenv('API_TOKEN', ''))
11
12
13
@pytest.fixture
14
def customer_data():
15
    return {
16
        'customer': {
17
            'id': 2481112,
18
            'name': 'John Doe',
19
            'email': '[email protected]',
20
            'registry_code': None,
21
            'code': None,
22
            'notes': None,
23
            'status': 'inactive',
24
            'created_at': '2017-04-19T13:08:51.795-03:00',
25
            'updated_at': '2017-04-19T13:08:51.795-03:00',
26
            'metadata': {},
27
            'address': {
28
                'street': None,
29
                'number': None,
30
                'additional_details': None,
31
                'zipcode': None,
32
                'neighborhood': None,
33
                'city': None,
34
                'state': None,
35
                'country': None
36
            },
37
            'phones': []
38
        }
39
    }
40
41
42
@pytest.fixture
43
def product_data():
44
    return {
45
        'product': {
46
            'id': 82534,
47
            'name': 'Product One',
48
            'code': 'product-one',
49
            'unit': None,
50
            'status': 'active',
51
            'description': None,
52
            'invoice': 'always',
53
            'created_at': '2017-04-20T08:27:28.000-03:00',
54
            'updated_at': '2017-04-20T08:27:28.000-03:00',
55
            'pricing_schema': {
56
                'id': 1196727,
57
                'short_format': 'R$ 100,00',
58
                'price': '100.0',
59
                'minimum_price': None,
60
                'schema_type': 'flat',
61
                'pricing_ranges': [],
62
                'created_at': '2017-04-20T08:27:28.000-03:00'
63
            },
64
            'metadata': {}
65
        }
66
    }
67
68
69
@pytest.fixture
70
def payment_method_data():
71
    return {
72
        'payment_method': {
73
            'id': 17293
74
        }
75
    }
76