Completed
Push — master ( 128b13...28096f )
by Allisson
21s
created

test_get_api_instance_with_api_root_url()   B

Complexity

Conditions 5

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 5
c 1
b 0
f 0
dl 0
loc 6
rs 8.5454
1
from vindi.api import get_api_instance
2
3
4
def test_get_api_instance():
5
    api = get_api_instance(token='')
6
    assert api.api_root_url == 'https://app.vindi.com.br/api/v1/'
7
    assert api.headers['Authorization'] == 'Basic Og=='
8
    assert api.headers['Content-Type'] == 'application/json'
9
    assert api.json_encode_body
10
11
12
def test_get_api_instance_with_api_root_url():
13
    api = get_api_instance(token='', api_root_url='https://sandbox-app.vindi.com.br/api/v1/')
14
    assert api.api_root_url == 'https://sandbox-app.vindi.com.br/api/v1/'
15
    assert api.headers['Authorization'] == 'Basic Og=='
16
    assert api.headers['Content-Type'] == 'application/json'
17
    assert api.json_encode_body
18