Commit 99cd46c6 authored by Gabriel Francisco's avatar Gabriel Francisco

Remove few PendingDeprecationWarning from tests

when building in Buster.

============================= test session starts ==============================
platform linux2 -- Python 2.7.16rc1, pytest-3.10.1, py-1.7.0, pluggy-0.8.0 -- /usr/bin/python2
cachedir: .pytest_cache
rootdir: /srv/dak, inifile:
collecting ... collected 166 items

[...]

=============================== warnings summary ===============================
tests/test_parse_changes.py::ParseChangesTestCase::test_3
  /srv/dak/tests/test_parse_changes.py:95: PendingDeprecationWarning: Please use assertFalse instead.
    self.failIf(changes.get('you'))
  /srv/dak/tests/test_parse_changes.py:95: PendingDeprecationWarning: Please use assertFalse instead.
    self.failIf(changes.get('you'))
  /srv/dak/tests/test_parse_changes.py:95: PendingDeprecationWarning: Please use assertFalse instead.
    self.failIf(changes.get('you'))

tests/test_parse_changes.py::ParseDscTestCase::test_9
  /srv/dak/tests/test_parse_changes.py:66: PendingDeprecationWarning: Please use assertFalse instead.
    self.failIf(changes.get('this'))

-- Docs: https://docs.pytest.org/en/latest/warnings.html
=================== 166 passed, 4 warnings in 19.14 seconds ====================
parent c3d8787c
Pipeline #40910 passed with stage
in 5 minutes and 49 seconds
...@@ -63,7 +63,7 @@ class ParseDscTestCase(ParseChangesTestCase): ...@@ -63,7 +63,7 @@ class ParseDscTestCase(ParseChangesTestCase):
def test_9(self): def test_9(self):
changes = self.assertParse('dsc/9.dsc', -1, 1) changes = self.assertParse('dsc/9.dsc', -1, 1)
self.assert_(changes['question'] == 'Is this a bug?') self.assert_(changes['question'] == 'Is this a bug?')
self.failIf(changes.get('this')) self.assertFalse(changes.get('this'))
def test_10(self): def test_10(self):
changes = self.assertParse('dsc/10.dsc', -1, 1) changes = self.assertParse('dsc/10.dsc', -1, 1)
...@@ -92,7 +92,7 @@ class ParseChangesTestCase(ParseChangesTestCase): ...@@ -92,7 +92,7 @@ class ParseChangesTestCase(ParseChangesTestCase):
'changes/%s.changes' % filename, 'changes/%s.changes' % filename,
strict_whitespace, strict_whitespace,
) )
self.failIf(changes.get('you')) self.assertFalse(changes.get('you'))
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment