Code Duplication    Length = 11-11 lines in 2 locations

tests/test_api_resources.py 2 locations

@@ 82-92 (lines=11) @@
79
    assert response.body['product']['id'] == product_data['product']['id']
80
81
82
@vcr.use_cassette()
83
def test_product_update(api, product_data):
84
    body = {
85
        'name': 'Product 1',
86
        'code': 'product-1',
87
    }
88
    response = api.products.update(product_data['product']['id'], body=body)
89
    assert response.status_code == status.HTTP_200_OK
90
    assert response.body['product']['id'] == product_data['product']['id']
91
    assert response.body['product']['name'] == body['name']
92
    assert response.body['product']['code'] == body['code']
93
94
95
@vcr.use_cassette()
@@ 31-41 (lines=11) @@
28
    assert response.body['customer']['id'] == customer_data['customer']['id']
29
30
31
@vcr.use_cassette()
32
def test_customer_update(api, customer_data):
33
    body = {
34
        'name': 'Jane Doe',
35
        'email': '[email protected]'
36
    }
37
    response = api.customers.update(customer_data['customer']['id'], body=body)
38
    assert response.status_code == status.HTTP_200_OK
39
    assert response.body['customer']['id'] == customer_data['customer']['id']
40
    assert response.body['customer']['name'] == body['name']
41
    assert response.body['customer']['email'] == body['email']
42
43
44
@vcr.use_cassette()