fix tests

parent 4c3e0eae
Pipeline #1523 canceled with stage
in 1 minute
......@@ -42,7 +42,7 @@ bconfsrv = /dev/null
# Please DO NOT touch the following line
# @salted@
[BASIC]
[BASIC:AUTH]
priority = toto
toto = pbkdf2:sha1:1000$HT0gMoYz$7540515e58f4ba54305664275a14ca5281c5d465
admin = pbkdf2:sha1:1000$Dgq3Nimi$5befb4cf4c3a7da2549679732908df5f0298b016
......@@ -42,6 +42,6 @@ bconfsrv = /dev/null
## Please DO NOT touch the following line
## @salted@
#[BASIC]
#[BASIC:AUTH]
#priority = 100
#admin = pbkdf2:sha1:1000$CgUFdUCs$294cbaaba63ba59eb28e1a9a52263957478cd0e7
......@@ -46,7 +46,7 @@ bconfsrv = this-file-should-not-exist
# Please DO NOT touch the following line
# @salted@
[BASIC]
[BASIC:AUTH]
admin = pbkdf2:sha1:1000$6pirc0vT$f9a6fb8b190d1c511aa9495dc18abb3dbd990d8f
user1 = pbkdf2:sha1:1000$Qz7VdEqR$ecb2025e90516cb379c26d2e0a6b6e74cc6f8b9a
......
......@@ -46,7 +46,7 @@ bconfsrv = this-file-should-not-exist
# Please DO NOT touch the following line
# @salted@
[BASIC]
[BASIC:AUTH]
admin = pbkdf2:sha1:1000$x0FYnJ8G$9a060c5939492f92a1889aa1a87a9647c3ec7a58
user1 = pbkdf2:sha1:1000$Iq2TSyBv$a6c22de68d387946195323f9130029085b9a3707
......
......@@ -46,7 +46,7 @@ bconfsrv = this-file-should-not-exist
# Please DO NOT touch the following line
# @salted@
[BASIC]
[BASIC:AUTH]
admin = pbkdf2:sha1:1000$NQcrMl1z$5687697aa1e2b4febe52741d50bd3265f3c7c99c
user1 = pbkdf2:sha1:1000$vGGwkyTV$7fb645b398a160eb860add362b3e79ae00ab5c86
......
......@@ -44,7 +44,7 @@ bconfcli = this-file-should-not-exist
# burp server configuration file used for the setting page
bconfsrv = this-file-should-not-exist
[BASIC]
[BASIC:AUTH]
admin = admin
user1 = password
......
......@@ -77,7 +77,7 @@ bconfcli = this-file-should-not-exist
# burp server configuration file used for the setting page
bconfsrv = this-file-should-not-exist
[BASIC]
[BASIC:AUTH]
admin = pbkdf2:sha1:1000$07Q0FeKW$eab0bc54b0d2e779081fe85c91ea84a50203d0bf
user1 = pbkdf2:sha1:1000$hWYnkYoh$ba7521104d262bb8cca3095c33ae1a3f19dbb3c7
......
......@@ -77,7 +77,7 @@ bconfcli = this-file-should-not-exist
# burp server configuration file used for the setting page
bconfsrv = this-file-should-not-exist
[BASIC]
[BASIC:AUTH]
admin = pbkdf2:sha1:1000$07Q0FeKW$eab0bc54b0d2e779081fe85c91ea84a50203d0bf
user1 = pbkdf2:sha1:1000$hWYnkYoh$ba7521104d262bb8cca3095c33ae1a3f19dbb3c7
......
......@@ -77,7 +77,7 @@ bconfcli = this-file-should-not-exist
# burp server configuration file used for the setting page
bconfsrv = this-file-should-not-exist
[BASIC]
[BASIC:AUTH]
admin = pbkdf2:sha1:1000$mv0bS5rd$f653a54f2edc321e8c320cf0b201ca36e3229349
user1 = pbkdf2:sha1:1000$hsljcrD3$10b8ea6bf0c9129ec56fbe94bdc8811fb2399c3f
......
......@@ -46,7 +46,7 @@ bconfsrv = /dev/null
## Please DO NOT touch the following line
## @salted@
#[BASIC]
#[BASIC:AUTH]
#priority = toto
#toto = pbkdf2:sha1:1000$HT0gMoYz$7540515e58f4ba54305664275a14ca5281c5d465
#admin = pbkdf2:sha1:1000$Dgq3Nimi$5befb4cf4c3a7da2549679732908df5f0298b016
......@@ -366,13 +366,13 @@ class BurpuiACLTestCase(TestCase):
rv = self.login('admin', 'admin')
response = self.client.get(url_for('api.auth_users'))
response2 = self.client.get(url_for('api.auth_backends'))
self.assertEqual(sorted(response.json, key=lambda k: k['name']), sorted([{'id': 'admin', 'name': 'admin', 'backend': 'BASIC'}, {'id': 'user1', 'name': 'user1', 'backend': 'BASIC'}], key=lambda k: k['name']))
self.assertEqual(sorted(response2.json, key=lambda k: k['name']), sorted([{'add': True, 'del': True, 'name': 'BASIC', 'description': 'Uses the Burp-UI configuration file to load its rules.', 'priority': 100, 'type': 'authentication', 'mod': True}], key=lambda k: k['name']))
self.assertEqual(sorted(response.json, key=lambda k: k['name']), sorted([{'id': 'admin', 'name': 'admin', 'backend': 'BASIC:AUTH'}, {'id': 'user1', 'name': 'user1', 'backend': 'BASIC:AUTH'}], key=lambda k: k['name']))
self.assertEqual(sorted(response2.json, key=lambda k: k['name']), sorted([{'add': True, 'del': True, 'name': 'BASIC:AUTH', 'description': 'Uses the Burp-UI configuration file to load its rules.', 'priority': 100, 'type': 'authentication', 'mod': True}], key=lambda k: k['name']))
def test_change_password(self):
with self.client:
rv = self.login('user1', 'password')
response = self.client.post(url_for('api.auth_users', name='user1'), data={'backend': 'BASIC', 'old_password': 'plop', 'password': 'toto'}, headers={'X-Language': 'en'})
response = self.client.post(url_for('api.auth_users', name='user1'), data={'backend': 'BASIC:AUTH', 'old_password': 'plop', 'password': 'toto'}, headers={'X-Language': 'en'})
self.assert_status(response, 200)
def test_config_render_ko(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment