[blivet 0/2] Make get_device_format_class behave as expected

mulhern amulhern at redhat.com
Wed Nov 27 21:39:10 UTC 2013


Basically, most clients of get_device_format_class expect it to return None
if it can not successfully do a class lookup. However, it has been 
returning DeviceFormat instead.

The first patch just sets up a few test cases to capture what is actually
going on. The second patch changes get_device_format_class so that it works
as expected, fixes up some invocations, and changes the tests accordingly.

mulhern (2):
  A few simple unit tests for some formats methods.
  Make get_device_format_class return None if class not found

 blivet/__init__.py              |  3 ++-
 blivet/formats/__init__.py      | 26 ++++++++++++--------------
 tests/formats_test/__init__.py  |  0
 tests/formats_test/init_test.py | 35 +++++++++++++++++++++++++++++++++++
 4 files changed, 49 insertions(+), 15 deletions(-)
 create mode 100644 tests/formats_test/__init__.py
 create mode 100644 tests/formats_test/init_test.py

-- 
1.8.3.1



More information about the anaconda-patches mailing list