def METHOD_NAME(self):
    '''
    Take date object and create ISO string from it.
    This is the reverse test to test_parse.
    '''
    if expectation is None:
        self.assertRaises(AttributeError,
                          date_isoformat, expectation, format,
                          yeardigits)
    else:
        self.assertEqual(date_isoformat(expectation, format,
                                        yeardigits),
                         datestring)