Skip to content

Commit d3057ba

Browse files
committed
Correct API test
* Update test to get short name instead of license name. Signed-off-by: Chin Yeung Li <[email protected]>
1 parent 6932755 commit d3057ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ class ApiTest(unittest.TestCase):
3737
@mock.patch.object(api, 'request_license_data')
3838
def test_api_get_license_details_from_api(self, request_license_data):
3939
license_data = {
40-
'name': 'Apache License 2.0',
40+
'short_name': 'Apache 2.0',
4141
'full_text': 'Apache License Version 2.0 ...',
4242
'key': 'apache-2.0',
4343
}
4444
errors = []
4545
request_license_data.return_value = license_data, errors
4646

4747
expected = (
48-
'Apache License 2.0',
48+
'Apache 2.0',
4949
'apache-2.0',
5050
'Apache License Version 2.0 ...',
5151
[])

0 commit comments

Comments
 (0)