| Total Complexity | 8 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | """Test munging filters.""" |
||
| 8 | class TestStr2Dt: |
||
| 9 | """All tests for str2dt function.""" |
||
| 10 | |||
| 11 | def test_title_returns_valid(self): |
||
| 12 | """Test function.""" |
||
| 13 | timestr = '01-05-1900 00:00:00' |
||
| 14 | res = datetimes.str2dt(timestr) |
||
| 15 | assert res == dtparse(timestr) == res |
||
| 16 | |||
| 17 | def test_title_returns_invalid(self): |
||
| 18 | """Test function.""" |
||
| 19 | assert datetimes.str2dt(None) is None |
||
| 20 | |||
| 21 | def test_title_returns_invalid_nonetype_str(self): |
||
| 22 | """Test function.""" |
||
| 23 | assert datetimes.str2dt('None') is None |
||
| 24 | |||
| 25 | def test_title_returns_invalid_nonetype_str2(self): |
||
| 26 | """Test function.""" |
||
| 27 | assert datetimes.str2dt('null') is None |
||
| 28 |