Compare commits

...

2 Commits

Author SHA1 Message Date
Nathan Chung 80ec0bac6b
tests: update assertions for new positions 4 months ago
Nathan Chung c2a5220b38
add new positions (#63) 4 months ago
  1. 8
      ceo/tui/views/position_names.py
  2. 4
      etc/ceo.ini
  3. 4
      etc/ceod.ini
  4. 28
      tests/ceo/cli/test_positions.py
  5. 4
      tests/ceo_dev.ini
  6. 4
      tests/ceod/api/test_positions.py
  7. 4
      tests/ceod_dev.ini
  8. 4
      tests/ceod_test_local.ini

@ -9,4 +9,12 @@ position_names = {
'imapd': "IMAPD",
'webmaster': "Web Master",
'offsck': "Office Manager",
'ext-affairs-lead': "External Affairs Lead",
'marketing-lead': "Marketing Lead",
'design-lead': "Design Lead",
'events-lead': "Events Lead",
'reps-lead': "Reps Lead",
'mods-lead': "Mods Lead",
'photography-lead': "Photography Lead",
'other': "Other",
}

@ -19,7 +19,9 @@ port = 9987
[positions]
required = president,vice-president,sysadmin
available = president,vice-president,treasurer,secretary,
sysadmin,cro,librarian,imapd,webmaster,offsck
sysadmin,cro,librarian,imapd,webmaster,offsck,
ext-affairs-lead,marketing-lead,design-lead,events-lead,
reps-lead,mods-lead,photography-lead,other
[mysql]
host = caffeine

@ -64,7 +64,9 @@ exec = exec,exec-moderators
[positions]
required = president,vice-president,sysadmin
available = president,vice-president,treasurer,secretary,
sysadmin,cro,librarian,imapd,webmaster,offsck
sysadmin,cro,librarian,imapd,webmaster,offsck,
ext-affairs-lead,marketing-lead,design-lead,events-lead,
reps-lead,mods-lead,photography-lead,other
[mysql]
# This is only used on the database_host.

@ -39,16 +39,24 @@ def test_positions(cli_setup, g_admin_ctx):
assert result.exit_code == 0
assert result.output == '''
The positions will be updated:
president: test_0
vice-president: test_1
sysadmin: test_2
secretary: test_3
webmaster: test_4
treasurer:
cro:
librarian:
imapd:
offsck:
president: test_0
vice-president: test_1
sysadmin: test_2
secretary: test_3
webmaster: test_4
treasurer:
cro:
librarian:
imapd:
offsck:
ext-affairs-lead:
marketing-lead:
design-lead:
events-lead:
reps-lead:
mods-lead:
photography-lead:
other:
Do you want to continue? [y/N]: y
Update positions in LDAP... Done
Update executive group in LDAP... Done

@ -15,7 +15,9 @@ port = 9987
[positions]
required = president,vice-president,sysadmin
available = president,vice-president,treasurer,secretary,
sysadmin,cro,librarian,imapd,webmaster,offsck
sysadmin,cro,librarian,imapd,webmaster,offsck,
ext-affairs-lead,marketing-lead,design-lead,events-lead,
reps-lead,mods-lead,photography-lead,other
[mysql]
host = coffee

@ -8,7 +8,11 @@ def test_get_positions(client, ldap_user, g_admin_ctx):
assert status == 200
expected = {
'president': ldap_user.uid,
'secretary': 'test_3',
'sysadmin': 'test_2',
'treasurer': ldap_user.uid,
'vice-president': 'test_1',
'webmaster': 'test_4',
}
assert data == expected

@ -60,7 +60,9 @@ exec = exec
[positions]
required = president,vice-president,sysadmin
available = president,vice-president,treasurer,secretary,
sysadmin,cro,librarian,imapd,webmaster,offsck
sysadmin,cro,librarian,imapd,webmaster,offsck,
ext-affairs-lead,marketing-lead,design-lead,events-lead,
reps-lead,mods-lead,photography-lead,other
[mysql]
username = mysql

@ -59,7 +59,9 @@ exec = exec
[positions]
required = president,vice-president,sysadmin
available = president,vice-president,treasurer,secretary,
sysadmin,cro,librarian,imapd,webmaster,offsck
sysadmin,cro,librarian,imapd,webmaster,offsck,
ext-affairs-lead,marketing-lead,design-lead,events-lead,
reps-lead,mods-lead,photography-lead,other
[mysql]
username = mysql

Loading…
Cancel
Save