Expire member cli and api #33

Merged
merenber merged 11 commits from expire-member into master 2021-12-11 16:30:20 -05:00
Owner

Closes #23

Still missing cli tests ;_;

Closes #23 Still missing cli tests ;_;
r345liu added 3 commits 2021-11-06 21:38:35 -04:00
continuous-integration/drone/pr Build is failing Details
a99f0dd9d5
add pytest for expire member and fix issues it brought
make create_user fixtures function scope
add shadowExpre atttribute to IUser
fix Term start month calulation
r345liu added 1 commit 2021-11-21 09:42:40 -05:00
continuous-integration/drone/pr Build is failing Details
7b69b3d719
add cli test and update api test for member expire api
r345liu changed title from WIP: Expire member cli and api to Expire member cli and api 2021-11-21 09:43:51 -05:00
Author
Owner

@merenber tests added

@merenber tests added
r345liu added 1 commit 2021-11-21 10:20:23 -05:00
continuous-integration/drone/pr Build is failing Details
945a754d48
fix flake8 error
r345liu added 1 commit 2021-11-28 11:14:32 -05:00
r345liu force-pushed expire-member from 72e3fdbaf6 to ed9dc28a2b 2021-11-28 18:11:41 -05:00 Compare
r345liu added 1 commit 2021-11-28 18:12:28 -05:00
merenber added 1 commit 2021-12-01 20:10:59 -05:00
continuous-integration/drone/pr Build is failing Details
4b32cd46aa
run CI
r345liu added 1 commit 2021-12-01 20:49:00 -05:00
continuous-integration/drone/pr Build is passing Details
6a1628da1e
add missing comma
merenber requested changes 2021-12-01 23:08:19 -05:00
merenber left a comment
Owner

Looks great - please see comments for requested changes.

Looks great - please see comments for requested changes.
@ -33,6 +33,7 @@ class User:
is_club_rep: Union[bool, None] = None,
is_club: bool = False,
ldap3_entry: Union[ldap3.Entry, None] = None,
shadowExpire: bool = False,
Owner

This should be an integer. shadowExpire is a Unix epoch timestamp.

This should be an integer. shadowExpire is a Unix epoch timestamp.
@ -155,6 +158,7 @@ class User:
mail_local_addresses=attrs.get('mailLocalAddress'),
is_club_rep=attrs.get('isClubRep', [False])[0],
is_club=('club' in attrs['objectClass']),
shadowExpire=attrs.get('shadowExpire', 0) != 0,
Owner

See comment above.

See comment above.
@ -4,3 +4,4 @@ wheel==0.36.2
pytest==6.2.4
aiosmtpd==1.4.2
aiohttp==3.7.4.post0
freezegun==1.1.0
Owner

If you merge the current master branch, you'll see that the Term class now uses a get_current_datetime function which can be mocked out using the standard patch function in the Python unittest library. (There are some tests which already use this which you can as examples.)

Could we please use this instead? Sorry for the late notice.

If you merge the current master branch, you'll see that the Term class now uses a `get_current_datetime` function which can be mocked out using the standard `patch` function in the Python unittest library. (There are some tests which already use this which you can as examples.) Could we please use this instead? Sorry for the late notice.
@ -12,3 +14,3 @@
@pytest.fixture(scope='module')
@pytest.fixture(scope='function')
Owner

I added a new_user pytest fixture in conftest.py. Could you use that instead of changing the scope of this fixture?

I added a `new_user` pytest fixture in conftest.py. Could you use that instead of changing the scope of this fixture?
r345liu force-pushed expire-member from 6a1628da1e to e76731fb4b 2021-12-11 13:41:52 -05:00 Compare
merenber added 1 commit 2021-12-11 16:20:07 -05:00
continuous-integration/drone/pr Build is passing Details
cb3516cc9f
re-organize test fixture scopes
merenber merged commit b4110d887d into master 2021-12-11 16:30:20 -05:00
merenber deleted branch expire-member 2021-12-11 16:30:20 -05:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: public/pyceo#33
No description provided.