def testExtract(text, expected_date, expected_leftover):
    res = extractWithFormat(text)
    self.assertEqual(res[0], expected_date)
    self.assertEqual(res[1], expected_leftover)
def testExtract(text, expected_date, expected_leftover):
    res = extractWithFormat(text)
    self.assertEqual(res[0], expected_date)
    self.assertEqual(res[1], expected_leftover)