s4: adding a DsdbTestCase class
kamenim at samba.org
Fri Nov 19 12:13:37 MST 2010
On Fri, Nov 19, 2010 at 17:48, Nadezhda Ivanova <nivanova at samba.org> wrote:
> Hi Jelmer and team,
> In the testsuites in dsdb/tests there is a practise currently that each test
> suite defines its own methods, even if they are the same as the ones used in
> other testsuites, such as delete_force, get_domain_sid and a few others. To
> avoid this, I suggest adding a DsdbTestCase class to samba.tests that
> contains these methods, and all the testsuites that use them to inherit it,
> as is the case with BlackboxTestCase and others. I have added the class
As previously discussed, I am not quite sure this is the right way
wrap up those methods.
Wrapping helpers in a TestCase classes will lead to a multiple
inheritance pretty soon.
What about implementing utility classes to wrap up methods?
Other way may be to add those methods to SamDb class, but
this will make it quite big and hard to read. (not to mention it is
not good practice to have everything in just one place :)
More information about the samba-technical