Skip to content
  • Etienne Allovon's avatar
    8350e193
    7564 - integration tests: rework the nosetest to unittest migration · 8350e193
    Etienne Allovon authored
    This commit finishes and fixes the integration of xivo_test_helpers
    AssetLaunchingTestCase for base confd integration tests.
    
    tl;dr:
    - use a fake test in test_aa_start_asset_for_all_tests file to start the
      asset via BaseIntegrationTestStart class
    - use a fake test in test_zz_stop_asset_for_call_tests file to stop the
      asset via BasetIntegrationTestStop class
    
    Longer explanation:
    - By moving towards unittest we had to put all test function in TestCase
      subclass.
    - There is no setup/teardown function at the suite level in unittest.
    - We wanted to keep the start asset -> test all base -> stop asset
      execution that nosetest was doing
    - We "faked" that with this test_aa and test_zz files based on the
      way unittest loads test
    
    Idea for future:
    - create our own test runner
    - or implement a mechanism in the class that start only the asset if not
      already started
    8350e193
    7564 - integration tests: rework the nosetest to unittest migration
    Etienne Allovon authored
    This commit finishes and fixes the integration of xivo_test_helpers
    AssetLaunchingTestCase for base confd integration tests.
    
    tl;dr:
    - use a fake test in test_aa_start_asset_for_all_tests file to start the
      asset via BaseIntegrationTestStart class
    - use a fake test in test_zz_stop_asset_for_call_tests file to stop the
      asset via BasetIntegrationTestStop class
    
    Longer explanation:
    - By moving towards unittest we had to put all test function in TestCase
      subclass.
    - There is no setup/teardown function at the suite level in unittest.
    - We wanted to keep the start asset -> test all base -> stop asset
      execution that nosetest was doing
    - We "faked" that with this test_aa and test_zz files based on the
      way unittest loads test
    
    Idea for future:
    - create our own test runner
    - or implement a mechanism in the class that start only the asset if not
      already started
Loading