'Test the warnings in each line of the file to match the
given severity.
:param file: The ``file`` to be checked.
:param severity: The severity level of the warnings in each
line of the file.'

def assertSeverity(self, file, severity, settings={}):

    severity_tag = RESULT_SEVERITY.reverse[severity]
    with requests_mock.Mocker() as m:
        m.add_matcher(custom_matcher)
        dep_bear = URLBear(self.section, Queue())
        deps_results = dict(URLBear=list(dep_bear.run('testfile', file, **settings)))
        outputs = list(self.uut.run('testfile', file, deps_results, **settings))
        for out in outputs:
            out_dict = out.to_string_dict()
            self.assertEqual(severity_tag, out_dict['severity'])
