Omnibus fixups for storyboard testing and CI

Linting fails due to two different hacking rules: H214 and H216. We fix
H214 by using assertNotIn and assertIn over assertFalse(foo in bar) and
assertTrue(foo in bar). We ignore H216 as it says don't use the mock
library but storyboard actually does use mock and updating to use
unittest.mock appears to be a fair bit of work.

In the sqlaclhemy models we move some classes around to address this
error:
  sqlalchemy.exc.InvalidRequestError: When initializing mapper mapped
  class Story->stories, expression 'TimeLineEvent' failed to locate a
  name ('TimeLineEvent'). If this is a class name, consider adding this
  relationship() to the <class 'storyboard.db.models.Story'> class after
  both dependent classes have been defined.

In the project loader we switch to using yaml.safe_load() to avoid the
missing Loader argument to yaml.load().

We pin jinja2 to < 3.0.0 as the old sphinx we've pinned to uses
contextfunction which appears to have been replaced in jinja2 3.0.0.
We should probably attempt to update the doc toolchain for storyboard
when we have time.

We pin MarkupSafe for similar reasons to the jinja2 pin. Version 2.1.0
of MarkupSafe removed the soft_unicode name which is used by sphinx.

Finally we run the python 3.6 and 3.7 jobs on ubuntu-bionic.

Change-Id: Ifcb6660ce2c89c21ba867aa88d942461bcff125d
This commit is contained in:
Clark Boylan 2022-04-18 15:36:24 -07:00
parent 9ec8875c4c
commit b502ec35b0
12 changed files with 100 additions and 93 deletions

View File

@ -89,8 +89,10 @@
- tox-pep8
- tox-py36:
timeout: 6000
nodeset: ubuntu-bionic
- tox-py37:
timeout: 6000
nodeset: ubuntu-bionic
- tox-py38:
timeout: 6000
- opendev-buildset-registry
@ -101,8 +103,10 @@
- tox-pep8
- tox-py36:
timeout: 6000
nodeset: ubuntu-bionic
- tox-py37:
timeout: 6000
nodeset: ubuntu-bionic
- tox-py38:
timeout: 6000
- opendev-buildset-registry

View File

@ -1,6 +1,8 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
jinja2<3.0.0
MarkupSafe<2.1.0
sphinx<2.0.0
sphinxcontrib-pecanwsme>=0.5
openstackdocstheme

View File

@ -310,6 +310,45 @@ story_storytags = Table(
)
# Time-line models
class TimeLineEvent(ModelBuilder, Base):
__tablename__ = 'events'
story_id = Column(Integer, ForeignKey('stories.id'), nullable=True)
worklist_id = Column(Integer, ForeignKey('worklists.id'), nullable=True)
board_id = Column(Integer, ForeignKey('boards.id'), nullable=True)
comment_id = Column(Integer, ForeignKey('comments.id'), nullable=True)
comment = relationship('Comment', backref='event')
author_id = Column(Integer, ForeignKey('users.id'), nullable=True)
event_type = Column(Enum(*event_types.ALL), nullable=False)
# this info field should contain additional fields to describe the event
# ex. {'old_status': 'Todo', 'new_status': 'In progress'}
# or {'old_assignee_id': 1, 'new_assignee_id': 42}
event_info = Column(UnicodeText(), nullable=True)
class Comment(FullText, ModelBuilder, Base):
__fulltext_columns__ = ['content']
id = Column(Integer, primary_key=True)
content = Column(MYSQL_MEDIUM_TEXT)
is_active = Column(Boolean, default=True)
in_reply_to = Column(Integer, ForeignKey('comments.id'))
parent = relationship('Comment', remote_side=[id], backref='children')
class HistoricalComment(FullText, ModelBuilder, Base):
__tablename__ = 'comments_history'
__fulltext_columns__ = ['content']
content = Column(MYSQL_MEDIUM_TEXT)
comment_id = Column(Integer, ForeignKey('comments.id'), nullable=False)
current = relationship(Comment, backref='history')
class Story(FullText, ModelBuilder, Base):
__tablename__ = 'stories'
@ -526,45 +565,6 @@ class StorySummary(Base):
"task_statuses"]
# Time-line models
class TimeLineEvent(ModelBuilder, Base):
__tablename__ = 'events'
story_id = Column(Integer, ForeignKey('stories.id'), nullable=True)
worklist_id = Column(Integer, ForeignKey('worklists.id'), nullable=True)
board_id = Column(Integer, ForeignKey('boards.id'), nullable=True)
comment_id = Column(Integer, ForeignKey('comments.id'), nullable=True)
comment = relationship('Comment', backref='event')
author_id = Column(Integer, ForeignKey('users.id'), nullable=True)
event_type = Column(Enum(*event_types.ALL), nullable=False)
# this info field should contain additional fields to describe the event
# ex. {'old_status': 'Todo', 'new_status': 'In progress'}
# or {'old_assignee_id': 1, 'new_assignee_id': 42}
event_info = Column(UnicodeText(), nullable=True)
class Comment(FullText, ModelBuilder, Base):
__fulltext_columns__ = ['content']
id = Column(Integer, primary_key=True)
content = Column(MYSQL_MEDIUM_TEXT)
is_active = Column(Boolean, default=True)
in_reply_to = Column(Integer, ForeignKey('comments.id'))
parent = relationship('Comment', remote_side=[id], backref='children')
class HistoricalComment(FullText, ModelBuilder, Base):
__tablename__ = 'comments_history'
__fulltext_columns__ = ['content']
content = Column(MYSQL_MEDIUM_TEXT)
comment_id = Column(Integer, ForeignKey('comments.id'), nullable=False)
current = relationship(Comment, backref='history')
# Subscription and notifications
class Subscription(ModelBuilder, Base):

View File

@ -38,7 +38,7 @@ LOG = log.getLogger(__name__)
def do_load_models(filename):
config_file = open(filename)
session = db_api.get_session(autocommit=False, in_request=False)
projects_list = yaml.load(config_file)
projects_list = yaml.safe_load(config_file)
project_groups = list()

View File

@ -151,7 +151,7 @@ class TestProjectGroupSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(1, len(results.json))
self.assertEqual('1', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual('projectgroup2', result['name'])
@ -164,7 +164,7 @@ class TestProjectGroupSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(2, len(results.json))
self.assertEqual('2', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])
@ -179,7 +179,7 @@ class TestProjectGroupSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(2, len(results.json))
self.assertEqual('2', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])
@ -196,7 +196,7 @@ class TestProjectGroupSearch(base.FunctionalTest):
self.assertEqual(1, len(results.json))
self.assertEqual('2', results.headers['X-Total'])
self.assertEqual('1', results.headers['X-Limit'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])
@ -224,7 +224,7 @@ class TestProjectGroupSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(3, len(results.json))
self.assertEqual('3', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(3, result['id'])
@ -242,7 +242,7 @@ class TestProjectGroupSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(3, len(results.json))
self.assertEqual('3', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])
@ -259,4 +259,4 @@ class TestProjectGroupSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(0, len(results.json))
self.assertEqual('0', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)

View File

@ -143,7 +143,7 @@ class TestProjectSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(3, len(results.json))
self.assertEqual('3', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
def test_search_by_name(self):
url = self.build_search_url({
@ -153,7 +153,7 @@ class TestProjectSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(1, len(results.json))
self.assertEqual('1', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual('project1', result['name'])
@ -166,7 +166,7 @@ class TestProjectSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(2, len(results.json))
self.assertEqual('2', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])
@ -181,7 +181,7 @@ class TestProjectSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(2, len(results.json))
self.assertEqual('2', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(2, result['id'])
@ -197,7 +197,7 @@ class TestProjectSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(1, len(results.json))
self.assertEqual('1', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(2, result['id'])
@ -210,7 +210,7 @@ class TestProjectSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(0, len(results.json))
self.assertEqual('0', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
def test_search_limit(self):
url = self.build_search_url({
@ -222,7 +222,7 @@ class TestProjectSearch(base.FunctionalTest):
self.assertEqual(1, len(results.json))
self.assertEqual('2', results.headers['X-Total'])
self.assertEqual('1', results.headers['X-Limit'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])
@ -250,7 +250,7 @@ class TestProjectSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(3, len(results.json))
self.assertEqual('3', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(3, result['id'])
@ -268,7 +268,7 @@ class TestProjectSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(3, len(results.json))
self.assertEqual('3', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])
@ -285,4 +285,4 @@ class TestProjectSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(0, len(results.json))
self.assertEqual('0', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)

View File

@ -253,7 +253,7 @@ class TestStorySearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(5, len(results.json))
self.assertEqual('5', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
def test_search_by_title(self):
url = self.build_search_url({
@ -263,7 +263,7 @@ class TestStorySearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(2, len(results.json))
self.assertEqual('2', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])
@ -278,7 +278,7 @@ class TestStorySearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(2, len(results.json))
self.assertEqual('2', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])
@ -293,7 +293,7 @@ class TestStorySearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(1, len(results.json))
self.assertEqual('1', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])
@ -304,7 +304,7 @@ class TestStorySearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(2, len(results.json))
self.assertEqual('2', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])
@ -319,7 +319,7 @@ class TestStorySearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(2, len(results.json))
self.assertEqual('2', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])
@ -334,7 +334,7 @@ class TestStorySearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(2, len(results.json))
self.assertEqual('2', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])
@ -349,7 +349,7 @@ class TestStorySearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(1, len(results.json))
self.assertEqual('1', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])
@ -401,7 +401,7 @@ class TestStorySearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(0, len(results.json))
self.assertEqual('0', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
def test_search_limit(self):
url = self.build_search_url({
@ -413,7 +413,7 @@ class TestStorySearch(base.FunctionalTest):
self.assertEqual(1, len(results.json))
self.assertEqual('2', results.headers['X-Total'])
self.assertEqual('1', results.headers['X-Limit'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])
@ -441,7 +441,7 @@ class TestStorySearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(5, len(results.json))
self.assertEqual('5', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(5, result['id'])
@ -463,7 +463,7 @@ class TestStorySearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(5, len(results.json))
self.assertEqual('5', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])

View File

@ -36,7 +36,7 @@ class TestTaskStatusesSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(5, len(results.json))
self.assertEqual('5', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
def test_search_by_name(self):
"""Test searching by various names."""
@ -49,7 +49,7 @@ class TestTaskStatusesSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(1, len(results.json))
self.assertEqual('1', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
# Assert that searching by 'task status' or some permutation works.
url = self.build_search_url({
@ -59,7 +59,7 @@ class TestTaskStatusesSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(5, len(results.json))
self.assertEqual('5', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
url = self.build_search_url({
'name': 'stat'
@ -68,7 +68,7 @@ class TestTaskStatusesSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(5, len(results.json))
self.assertEqual('5', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
def test_search_constrain(self):
"""Test constraint searches."""

View File

@ -423,7 +423,7 @@ class TestTaskSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(4, len(results.json))
self.assertEqual('4', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
def test_search_by_title(self):
url = self.build_search_url({
@ -433,7 +433,7 @@ class TestTaskSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(2, len(results.json))
self.assertEqual('2', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])
@ -448,7 +448,7 @@ class TestTaskSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(3, len(results.json))
self.assertEqual('3', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])
@ -465,7 +465,7 @@ class TestTaskSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(1, len(results.json))
self.assertEqual('1', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])
@ -478,7 +478,7 @@ class TestTaskSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(2, len(results.json))
self.assertEqual('2', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(2, result['id'])
@ -493,7 +493,7 @@ class TestTaskSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(3, len(results.json))
self.assertEqual('3', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(2, result['id'])
@ -510,7 +510,7 @@ class TestTaskSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(2, len(results.json))
self.assertEqual('2', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(2, result['id'])
@ -523,7 +523,7 @@ class TestTaskSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(3, len(results.json))
self.assertEqual('3', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(2, result['id'])
@ -540,7 +540,7 @@ class TestTaskSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(2, len(results.json))
self.assertEqual('2', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])
@ -553,7 +553,7 @@ class TestTaskSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(2, len(results.json))
self.assertEqual('2', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(2, result['id'])
@ -568,7 +568,7 @@ class TestTaskSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(0, len(results.json))
self.assertEqual('0', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
def test_search_limit(self):
url = self.build_search_url({
@ -580,7 +580,7 @@ class TestTaskSearch(base.FunctionalTest):
self.assertEqual(1, len(results.json))
self.assertEqual('2', results.headers['X-Total'])
self.assertEqual('1', results.headers['X-Limit'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])
@ -608,7 +608,7 @@ class TestTaskSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(4, len(results.json))
self.assertEqual('4', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(1, result['id'])
@ -628,7 +628,7 @@ class TestTaskSearch(base.FunctionalTest):
results = self.get_json(url, expect_errors=True)
self.assertEqual(4, len(results.json))
self.assertEqual('4', results.headers['X-Total'])
self.assertFalse('X-Marker' in results.headers)
self.assertNotIn('X-Marker', results.headers)
result = results.json[0]
self.assertEqual(4, result['id'])

View File

@ -43,13 +43,13 @@ class UniqueRevisionsTestCase(testtools.TestCase):
module = imp.load_source('module', six.text_type(module_path))
revision_id = module.revision
self.assertFalse(revision_id in revisions,
self.assertNotIn(revision_id, revisions,
"Found two revisions with id %s" % revision_id)
revisions.add(revision_id)
down_revision_id = module.revision
self.assertFalse(down_revision_id in down_revisions,
self.assertNotIn(down_revision_id, down_revisions,
"Found two revisions with down_revision_id %s"
% revision_id)
down_revisions.add(down_revision_id)

View File

@ -53,9 +53,9 @@ class TestUserPreferencesPluginBase(base.TestCase):
self.assertEqual(2, len(manager.extensions))
manager.map(prefs_base.load_preferences, loaded_prefs)
self.assertTrue("foo" in loaded_prefs)
self.assertTrue("omg" in loaded_prefs)
self.assertTrue("lol" in loaded_prefs)
self.assertIn("foo", loaded_prefs)
self.assertIn("omg", loaded_prefs)
self.assertIn("lol", loaded_prefs)
self.assertEqual(loaded_prefs["foo"], "baz")
self.assertEqual(loaded_prefs["omg"], "wat")

View File

@ -54,8 +54,9 @@ commands =
# The following rules should either be addressed or determined to be
# skippable long term.
# E265 is ignored to make switch to newer hacking easier
# H216 is ignored to allow use of the mock library instead of unittest.mock
# H405 is ignored to make switch to newer hacking easier
ignore = E125,E128,E265,H405,W503
ignore = E125,E128,E265,H216,H405,W503
builtins = _
show-source = True
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build