Code Duplication    Length = 6-9 lines in 2 locations

tests/test_api_resources.py 2 locations

@@ 6-14 (lines=9) @@
3
from tests.vcr import vcr
4
5
6
@vcr.use_cassette()
7
def test_customer_create(api, customer_data):
8
    body = {
9
        'name': customer_data['customer']['name'],
10
        'email': customer_data['customer']['email']
11
    }
12
    response = api.customers.create(body=body)
13
    assert response.status_code == status.HTTP_201_CREATED
14
    assert response.body['customer']['id'] == customer_data['customer']['id']
15
16
17
@vcr.use_cassette()
@@ 44-49 (lines=6) @@
41
    assert response.body['customer']['email'] == body['email']
42
43
44
@vcr.use_cassette()
45
def test_customer_destroy(api, customer_data):
46
    response = api.customers.destroy(customer_data['customer']['id'])
47
    assert response.status_code == status.HTTP_200_OK
48
    assert response.body['customer']['id'] == customer_data['customer']['id']
49
    assert response.body['customer']['status'] == 'archived'
50
51
52
@vcr.use_cassette()