This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/1741/

On May 19th, 2014, 10:01 a.m. UTC, Michal Minar wrote:

src/account/test/TestIndicationEventStream.py (Diff revision 1)
127
    def xtest_create_50(self):
Why the leading 'x'?
IMHO it prevents the test from being discovered and run.
Sorry, YHO is right: that was disabled for my debugging, and must have creeped in somehow :)

On May 19th, 2014, 10:01 a.m. UTC, Michal Minar wrote:

src/account/test/TestIndicationEventStream.py (Diff revision 1)
133
        self.options['delay_chillout'] = 20
Since the order of tests execution is not deterministic, this assignment nondeterministically affect other tests which do not modify options. Maybe this option could be passed as a keyword argument to self.assertExpectedStream that would treat them as additional options to driver.
Are you sure?  AFAIK, unittest.TestCase instance is thrown away after each test, and born again, and setUp/tearDown is called each time.  (Yes. it's confusing behavior of the unittest framework:  you define set of methods of TestCase and it looks like "normal class" but in reality they never exist together in one instance; instead, new "empty" instance with only one test* method is created per case.)

So I believe new dict self.options is assigned in setUp each time, so it does not actually influence other cases.

That said, I agree it could be more explicit; maybe by passing via the assert*

- Alois


On May 14th, 2014, 4:31 p.m. UTC, Alois Mahdal wrote:

Review request for OpenLMI Developers.
By Alois Mahdal.

Updated May 14, 2014, 4:31 p.m.

Repository: openlmi-providers

Description

Basic set of tests with focus on this flow:

  1. add set of subscriptions
  2. add set of handlers
  3. trigger sequence of "interesting" events
  4. collect indications
  5. and make assertions as needed

Currently the assertions are mostly that correct classes have been
delivered, reporting the events in correct order.

Diffs

  • src/account/test/TestIndicationEventStream.py (PRE-CREATION)

View Diff