'Assert that the a DeprecationWarning with the given message was
emitted against the given method.'

def assertDeprecations(self, testMethod, message):

    warnings = self.flushWarnings([testMethod])
    self.assertEqual(warnings[0]['category'], DeprecationWarning)
    self.assertEqual(warnings[0]['message'], message)
    self.assertEqual(len(warnings), 1)
