'Invalid page numbers result in the correct exception being raised.'

def test_invalid_page_number(self):

    paginator = Paginator([1, 2, 3], 2)
    with self.assertRaises(InvalidPage):
        paginator.page(3)
    with self.assertRaises(PageNotAnInteger):
        paginator.validate_number(None)
    with self.assertRaises(PageNotAnInteger):
        paginator.validate_number('x')
    paginator = Paginator([], 2)
    self.assertEqual(paginator.validate_number(1), 1)
