check confirm is True

This commit is contained in:
Matthias 2021-11-21 02:28:01 +01:00
parent 6b1c436135
commit ba6a7c0541
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -50,6 +50,11 @@ class PluginDetailAPITest(InvenTreeAPITestCase):
self.assertEqual(data['packagename'][0].title().upper(), self.MSG_NO_PKG.upper()) self.assertEqual(data['packagename'][0].title().upper(), self.MSG_NO_PKG.upper())
# not confirmed # not confirmed
data = self.post(url, { self.post(url, {
'packagename': self.PKG_NAME 'packagename': self.PKG_NAME
}, expected_code=400).data }, expected_code=400).data
data = self.post(url, {
'packagename': self.PKG_NAME,
'confirm': False,
}, expected_code=400).data
self.assertEqual(data['confirm'][0].title().upper(), 'Installation not confirmed'.upper())