Expire member cli and api #33

Merged
merenber merged 11 commits from expire-member into master 1 year ago
r345liu commented 1 year ago
Owner

Closes #23

Still missing cli tests ;_;

Closes #23 Still missing cli tests ;_;
r345liu added 3 commits 1 year ago
a99f0dd9d5 add pytest for expire member and fix issues it brought
r345liu added 1 commit 1 year ago
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 1 year ago
Poster
Owner

@merenber tests added

@merenber tests added
r345liu added 1 commit 1 year ago
945a754d48 fix flake8 error
r345liu added 1 commit 1 year ago
r345liu force-pushed expire-member from 72e3fdbaf6 to ed9dc28a2b 1 year ago
r345liu added 1 commit 1 year ago
merenber added 1 commit 1 year ago
4b32cd46aa run CI
r345liu added 1 commit 1 year ago
6a1628da1e add missing comma
merenber requested changes 1 year ago
merenber left a comment
Owner

Looks great - please see comments for requested changes.

Looks great - please see comments for requested changes.
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.
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.
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.
@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 1 year ago
merenber added 1 commit 1 year ago
cb3516cc9f re-organize test fixture scopes
merenber merged commit b4110d887d into master 1 year ago
merenber deleted branch expire-member 1 year ago
merenber referenced this issue from a commit 1 year ago

Reviewers

merenber requested changes 1 year ago
continuous-integration/drone/pr Build is passing
The pull request has been merged as b4110d887d.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: public/pyceo#33
Loading…
There is no content yet.