#50228 Issue: 50227 - Making an cosClassicDefinition type in src/lib389/lib389/cos.py
Closed by spichugi. Opened by aborah.
aborah/389-ds-base cos  into  master

Download 50228.patch

Making an cosClassicDefinition type in src/lib389/lib389/cos.py

https://pagure.io/389-ds-base/issue/50227

Reviewed by: ???

I have asked this before, but when adding new types like this you need to provide a test that proves it works.

If they type doesn't use the rdn field, don't include it.

rebased onto a18fc0b4b49349a2aface5f47582dc94fadfb202

@firstyear all changes are done as per your suggestion

rebased onto 9639eb34c5d8b47587bcb99966d7e426322d7155

Why do you do this twice instead of:

def = CosClassicDefinitions(...).get('name')
assert def.dn == ...
assert def.get_attr_val_utf8() == ...

Second, you don't really test that the definition is actually working, only that you can create it ... I would think to prove that the definition is created correctly, one needs to test that it actually works correctly within the confines of the plugin.

rebased onto 6facb0f0e6be5a2e560ceb23c22b150bfec78f22

rebased onto 2f49e45747b646ca81d63324679e2e71c01849de

@firstyear all changes are done as per your suggestion

I think your documentation here is really vague.

ADd comments about what you are doing and why. Just because @aborah of today knows what you are doing, come back in a week and you may forget! I comment everything obsessively because Firstyear of the future is an idiot and needs help.

I don't know why you try to make everything one-liners like this, but it's hard to read and follow. Just please please please use patterns like:

nsc = nsContainer(
    long things
)
nsc.create(...)

OR

nsContainer(
    long things
)
    .create(...)

The former is more "pythonic", the later is "rustic".

rebased onto 9d95ac5dc0b5ee1eec1dfe95de843c1b8d7b3e91

@firstyear all changes are done as per your suggestion

rebased onto a1cf4a0c8992a3cad52542c9c3dc83df2a0da328

You already define "user", above, why not just do "user.present()" ... it's not like the object vanished between then and now ....

rebased onto bc3ea14c855d8ece62f7cccb27a2f8135ec866e1

@firstyear all changes are done as per your suggestion

Pull-Request has been merged by firstyear

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3287

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

Metadata