def test_get_valid_iso_date_9(self):
     """ non-valid dates return empty string """
     self.assertTrue(get_valid_iso_date('abc') == '')
 def test_get_valid_iso_date_7(self):
     """ test MM/DD/YYYY format """
     self.assertTrue(get_valid_iso_date('2/7/2019') == '2019-02-07')
 def test_get_valid_iso_date_8(self):
     """ blank out 0 date """
     self.assertTrue(get_valid_iso_date('0 - 0') == '')
 def test_get_valid_iso_date_6(self):
     """ test range of years, like YYYY - YYYY """
     self.assertTrue(get_valid_iso_date('2019 - 2019') == '2019-01-01')
 def test_get_valid_iso_date_5(self):
     """ test YYYYMM date """
     self.assertTrue(get_valid_iso_date('201902') == '2019-02-01')
 def test_get_valid_iso_date_4(self):
     """ test YYYYMMDD date """
     self.assertTrue(get_valid_iso_date('20190207') == '2019-02-07')
 def test_get_valid_iso_date_3(self):
     """ test YYYY date """
     self.assertTrue(get_valid_iso_date('2019') == '2019-01-01')
 def test_get_valid_iso_date_1(self):
     """ test iso YYYY-MM-DD date """
     self.assertTrue(get_valid_iso_date('2019-02-07') == '2019-02-07')