1. 23 Mar, 2014 1 commit
  2. 18 Feb, 2014 4 commits
    • Doug Hellmann's avatar
      Rename oslo.test to oslotest · 16c319ed
      Doug Hellmann authored
      The testing strategy for this library has changed, and so it
      will not be installed via devstack like the other oslo libraries.
      That means we don't want it in the oslo namespace package,
      to avoid issues like bug 1277168.
      Change-Id: I3ca1104663d0c89a351f4cc830414b41bb23fa29
    • Doug Hellmann's avatar
      Add test for moxstubout · 5f92f04e
      Doug Hellmann authored
      Add a test for moxstubout and update all of the python3-related
      bits needed so the tests will pass there. Those changes are
      based on Julien's work in https://review.openstack.org/#/c/55606
      Change-Id: Ie7c41dbfbabfb3bcbd4e181b095aa2cf09345f5c
    • Doug Hellmann's avatar
      Switch to oslosphinx · 224b61f7
      Doug Hellmann authored
      Change-Id: If89d9324b7de199c628726a83919276f5483d337
    • Doug Hellmann's avatar
      Sync requirements and fix pep8 errors · 25ab247b
      Doug Hellmann authored
      Sync the requirements from the global list and
      fix a few pep8 issues caused by not using the
      proper template for creating the repository.
      Change-Id: I5407712c34f35d4699aed130fcd0877414b6bc2c
  3. 14 Feb, 2014 4 commits
  4. 31 Jan, 2014 4 commits
  5. 30 Jan, 2014 4 commits
    • Doug Hellmann's avatar
      Remove lockutils fixture from this library · 726d6aab
      Doug Hellmann authored
      The module oslo.test.fixture.lockutils depends on another oslo
      library, introducing a circular dependency between it and this
      test library. We will distribute the lockutils fixtures as part
      of the other library.
      Change-Id: I46c9d14a6a5583f36062e72c8b4f729afe3dca6c
    • Doug Hellmann's avatar
      Run python 3.3 tests first to set testr db type · fbace010
      Doug Hellmann authored
      testr uses anydbm, which defaults to a different type under
      python 2.7 and 3.3. The default under 2.7 is no longer available
      under 3.3, so without this change running "tox" results in
      an error from testr about loading its database. With this
      change, the 3.3 tests run first and then 2.7 can read the
      database created.
      Change-Id: I1a51d228c06af0ea7d3579fcec53d35922292e2d
    • Doug Hellmann's avatar
      Add packaging and test control files · 05dc2d86
      Doug Hellmann authored
      Need to move the tests back outside of the oslo.test package
      because testr complains about importing them from the
      wrong place if we don't.
      Change-Id: If8e0521dc345f8941f9c7116477549291cf600d2
    • Doug Hellmann's avatar
      rearrange files into the proper package · e079880e
      Doug Hellmann authored
      Change-Id: Ia7c890050a5c52c085069c3aa170ff23da97a66b
  6. 13 Dec, 2013 1 commit
  7. 13 Jan, 2014 1 commit
    • Mauro S. M. Rodrigues's avatar
      Add 'new' parameter to mock.Patch and mock.PatchObject classes · e8218cb2
      Mauro S. M. Rodrigues authored
      These two classes are using mock module, although both of them weren't using the
      'new' parameter from mock.patch and mock.patch.object which allow us to set a
      specific method to be executed instead of the using MagicMock.
      As mock's patch doc string says (and it says in patch,object that the parameters
      are the same):
      "If `new` is omitted, then the target is replaced with a 'MagicMock'."
      Unit test to prove that both approaches work were also added.
      Usage example:
      I replaced request method from tempest's rest_client by a fake request which
      gives a fake response to authentication request (Line 192 for instance).
      Change-Id: I32a90b4d47174b6adb53b525a4add7002411b29d
  8. 07 Jan, 2014 1 commit
  9. 19 Dec, 2013 1 commit
    • Angus Salkeld's avatar
      log all test messages not just oslo ones · 9def85b1
      Angus Salkeld authored
      This is a bit frustrating at the moment as you don't project specific
      error messages when a test fails (it only shows the oslo logging messages).
      By removing the 'openstack.common', we get all logs.
      Change-Id: I1a018038be0ac82ead27814a357b50d0514087fb
  10. 10 Dec, 2013 1 commit
  11. 28 Nov, 2013 1 commit
    • Noorul Islam K M's avatar
      Trivial: Make vertical white space after license header consistent · e731f93b
      Noorul Islam K M authored
      Vertical white space between license header and the actual code is not consistent
      across files. It looks like majority of the files leaves a single blank line
      after license header. So make it consistent except for those exceptional cases
      where the actual code starts with a function or class definition.
      Change-Id: If6679ab19dc2d7a9df93e076db3019abc1e5b86b
  12. 11 Oct, 2013 1 commit
    • Joe Gordon's avatar
      Remove vim header · 3a9d6c30
      Joe Gordon authored
      No need to set tabstop 189 times, this can be set in your vimrc file
      instead.  Also if set incorrectly gate (pep8 check) will catch your
      Change-Id: Ic6f0c0ef94e8194a5c121598305d1ec3c74e4843
  13. 14 Nov, 2013 1 commit
    • Monty Taylor's avatar
      Fix copyright header on test module · 8f2053b0
      Monty Taylor authored
      Clark and I wrote the code that was pulled in to this file this past
      year. It's certainly not copyright 2011-2012, and in no way is it
      copyright the foundation.
      Change-Id: If89d2447948b03dfbbfd5b1e5387a043ce21e243
  14. 13 Nov, 2013 1 commit
  15. 05 Nov, 2013 1 commit
  16. 02 Nov, 2013 1 commit
  17. 16 Oct, 2013 2 commits
    • Davanum Srinivas's avatar
      Move LockFixture into a fixtures module · 210a9809
      Davanum Srinivas authored
      In Nova and other projects, fixtures are in test-requirements.txt and
      NOT in requirements.txt so updating nova to use latest lockutils.py
      is not possible. So let us move LockFixture out into it a separate
      fixtures.py module where in theory we can add other fixtures as
      well. See https://review.openstack.org/#/c/52153/ for an attempt to
      try latest lockutils.py in Nova.
      Change-Id: I12942d6390d06bb889d4145e708692fa886d99b5
    • Soren Hansen's avatar
      Consolidate the use of stubs · 0eadafed
      Soren Hansen authored
      We have two separate StubOutForTesting objects when running tests. One
      that is instantiated directly in the moxstubout fixture and one that
      mox has for itself.
      When a method is stubbed, the overridden method is kept in a cache in
      the StubOutForTesting instance. When calling UnsetAll() on this
      instance, the order of the cache is reversed and the original methods
      are put back in place. This means if you have SomeObject with a method
      called actual_method and you stub that out with
          stubs.Set(SomeObject, "actual_method", fake_method)
      you end up with a this tuple in the cache:
          (SomeObject, "actual_method", SomeObject.actual_method)
      If you stub it out again
          stubs.Set(SomeObject, "actual_method", fake_method2)
      this tuple is appended to the cache:
          (SomeObject, "actual_method", fake_method)
      When calling UnsetAll(), the cache is reversed and becomes:
          [(SomeObject, "actual_method", fake_method),
           (SomeObject, "actual_method", SomeObject.actual_method)]
      So first, SomeObject.actual_method (which currently is fake_method2) is
      set to fake_method, and then set to the original
      SomeObject.actual_method medthod.
      If, however, you stub out the same method using both mox and our own
      StubOutForTesting object, one of the caches will have
          (SomeObject, "actual_method", SomeObject.actual_method)
      and the other will have:
          (SomeObject, "actual_method", fake_method)
      At this point, restoring everything back to the original state depends
      on these StubOutForTesting objects getting cleaned up in the correct
      order. If it's done in the wrong order, SomeObject.actual_method
      (currently set to fake_method2) will get reset to the original
      SomeObject.actual_method and subsequently get "reset" to fake_method
      which makes life miserable for subsequent tests that might rely on the
      real implementation.
      This change stops us from having two separate StubOutForTesting objects
      by simply using mox's all the time.
      Fixes bug #1239898
      Change-Id: I3a768eca3432e6df09c87bd86bffa9763aabfbed
  18. 08 Oct, 2013 1 commit
  19. 08 Sep, 2013 1 commit
  20. 16 Aug, 2013 1 commit
  21. 02 Aug, 2013 1 commit
    • Alexander Gorodnev's avatar
      Add a fixture for dealing with config · eefbf314
      Alexander Gorodnev authored
      Many tests change config's variables directly in CONF object. This
      fixture allows to override the values in more convenient way and
      restores config after test completion.
      Blueprint: common-unit-tests
      Change-Id: I5535c534425278d8804ca9fe84846e15ac898db0
  22. 17 Jul, 2013 1 commit
  23. 18 Jul, 2013 1 commit
    • Luis A. Garcia's avatar
      Add eclipse project files to .gitignore · 6c79e11b
      Luis A. Garcia authored
      Like some of the other projects (nova, heat) ignore eclipse
      project files, for those people that work with eclipse (yuck :)
      Change-Id: Ifbb5762b6e16b315f4066ceff35e85d2ac6f990f
  24. 12 Jul, 2013 1 commit
  25. 22 May, 2013 1 commit
  26. 13 Feb, 2013 1 commit
    • Doug Hellmann's avatar
      Add join_consumer_pool() to RPC connections · ada3b5e5
      Doug Hellmann authored
      blueprint move-listener-framework-oslo
      bug 1047015
      bug 1111632
      Ceilometer and Quantum use private methods of the RPC connection
      object to configure themselves to listen to a queue shared among a
      group of workers. This change adds a public method to the RPC
      connection to support this use case, without resorting to using
      private API calls.
      Change-Id: I3a89f1dfdcf8accca70cf305f7a31315bea093d8
      Signed-off-by: default avatarDoug Hellmann <doug.hellmann@dreamhost.com>
  27. 06 Feb, 2013 1 commit