def test_valid_has_double(self): self.assertTrue(is_valid(123455))
def test_valid_length(self): self.assertTrue(is_valid(111111))
def test_has_double(self): self.assertFalse(is_valid(123789))
def test_is_valid_answer(self): self.assertEqual(sum([is_valid(n) for n in range(347312, 805915)]), 594)
def test_always_increases(self): self.assertFalse(is_valid(223450))