fix up the patch soe tests pass
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
This commit is contained in:
parent
aa6d06094c
commit
d8f514fdb4
@ -1,14 +1,17 @@
|
||||
From e28a89916a484e05ccc77bc603e61ecf892d1055 Mon Sep 17 00:00:00 2001
|
||||
From c01b76db26893f8257c17dcff838005625adc529 Mon Sep 17 00:00:00 2001
|
||||
From: Dennis Gilmore <dennis@ausil.us>
|
||||
Date: Thu, 18 Feb 2016 19:50:52 -0600
|
||||
Subject: [PATCH] update the other two _validate_version functions to allow for
|
||||
Rawhide to be valid
|
||||
|
||||
Fix up the tests
|
||||
|
||||
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
|
||||
---
|
||||
productmd/common.py | 3 ++-
|
||||
productmd/treeinfo.py | 3 ++-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
productmd/common.py | 3 ++-
|
||||
productmd/treeinfo.py | 3 ++-
|
||||
tests/test_header.py | 10 +++++-----
|
||||
3 files changed, 9 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/productmd/common.py b/productmd/common.py
|
||||
index 3447c05..b23d71f 100644
|
||||
@ -38,6 +41,35 @@ index a14305e..67f5ed9 100644
|
||||
|
||||
def _validate_short(self):
|
||||
self._assert_type("short", list(six.string_types))
|
||||
diff --git a/tests/test_header.py b/tests/test_header.py
|
||||
index 206307a..5c18dcf 100755
|
||||
--- a/tests/test_header.py
|
||||
+++ b/tests/test_header.py
|
||||
@@ -40,19 +40,19 @@ class TestHeader(unittest.TestCase):
|
||||
self.assertRaises(TypeError, hdr.validate)
|
||||
|
||||
# invalid version
|
||||
- hdr.version = "first"
|
||||
- self.assertRaises(ValueError, hdr.validate)
|
||||
-
|
||||
hdr.version = "1.alpha2"
|
||||
self.assertRaises(ValueError, hdr.validate)
|
||||
|
||||
+ # valid version
|
||||
hdr.version = "1"
|
||||
- self.assertRaises(ValueError, hdr.validate)
|
||||
+ hdr.validate()
|
||||
|
||||
- # valid version
|
||||
hdr.version = "1.22"
|
||||
hdr.validate()
|
||||
|
||||
+ hdr.version = "first"
|
||||
+ hdr.validate()
|
||||
+
|
||||
def test_deserialize(self):
|
||||
hdr = Header(None)
|
||||
data = {
|
||||
--
|
||||
2.5.0
|
||||
|
||||
|
@ -55,7 +55,9 @@ and installation media.
|
||||
|
||||
%prep
|
||||
%setup -qc -n productmd-%{version}
|
||||
pushd productmd-%{version}
|
||||
%patch0 -p1
|
||||
popd
|
||||
mv productmd-%{version} python2
|
||||
|
||||
cp -a python2 python3
|
||||
|
Loading…
Reference in New Issue
Block a user