Merge "os-api-ref: Drop oslosphinx BuildRequires and fix build"
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
From 4e56d09dafaa7e2b2dc9fd2cd1864ffe6c39e219 Mon Sep 17 00:00:00 2001
|
||||
From: Luigi Toscano <ltoscano@redhat.com>
|
||||
Date: Fri, 11 Jan 2019 11:58:11 +0100
|
||||
Subject: [PATCH] Fix microversion test: handle different HTML renderings
|
||||
|
||||
The rendered HTML changes a bit between beautifulsoup4 4.6.3 and 4.7.1.
|
||||
A regular expression can handle both cases.
|
||||
|
||||
Change-Id: I64d4c56b480d54b50e58141999636b91b5fb4f94
|
||||
---
|
||||
os_api_ref/tests/test_microversions.py | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/os_api_ref/tests/test_microversions.py b/os_api_ref/tests/test_microversions.py
|
||||
index b58f6a6..d58f673 100644
|
||||
--- a/os_api_ref/tests/test_microversions.py
|
||||
+++ b/os_api_ref/tests/test_microversions.py
|
||||
@@ -45,13 +45,13 @@ class TestMicroversions(base.TestCase):
|
||||
def test_rest_method(self):
|
||||
"""Test that min / max mv css class attributes are set"""
|
||||
content = self.soup.find_all(class_='rp_min_ver_2_17')
|
||||
- self.assertIn(
|
||||
- '<div class="operation-grp rp_min_ver_2_17 rp_max_ver_2_19 ">',
|
||||
- str(content[0]))
|
||||
+ self.assertRegexpMatches(
|
||||
+ str(content[0]),
|
||||
+ '^<div class="operation-grp rp_min_ver_2_17 rp_max_ver_2_19 ?"')
|
||||
content = self.soup.find_all(class_='rp_max_ver_2_19')
|
||||
- self.assertIn(
|
||||
- '<div class="operation-grp rp_min_ver_2_17 rp_max_ver_2_19 ">',
|
||||
- str(content[0]))
|
||||
+ self.assertRegexpMatches(
|
||||
+ str(content[0]),
|
||||
+ '^<div class="operation-grp rp_min_ver_2_17 rp_max_ver_2_19 ?"')
|
||||
|
||||
def test_parameters_table(self):
|
||||
"""Test that min / max mv css class attributes are set in params"""
|
||||
--
|
||||
2.21.0
|
||||
|
@@ -11,12 +11,13 @@ License: {{ license('Apache-2.0') }}
|
||||
Group: Development/Languages/Python
|
||||
URL: https://launchpad.net/%{sname}
|
||||
Source0: {{ source }}
|
||||
# https://review.openstack.org/#/c/630146/
|
||||
Patch1: 0001-Fix-microversion-test-handle-different-HTML-renderin.patch
|
||||
BuildRequires: openstack-macros
|
||||
BuildRequires: {{ py2pkg('PyYAML', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('Sphinx', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('beautifulsoup4', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('openstackdocstheme', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('oslosphinx', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('pbr', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('python-subunit', py_versions=['py2', 'py3']) }}
|
||||
BuildRequires: {{ py2pkg('sphinx-testing', py_versions=['py2', 'py3']) }}
|
||||
|
Reference in New Issue
Block a user