def test_func_datetime_parse(self):
        func_str = 'DateTime.Parse("2011-01-01")'

        result = ScopeResolver().resolve_func(
            func_str)  # result is datetime obj
        result_str = result.strftime('%Y-%m-%d')
        self.assertEqual("2011-01-01", result_str)
    def test_func_datetime_parseexact(self):
        func_str = 'DateTime.ParseExact("2018-01-01" + " 00:00:00", "yyyy-MM-dd HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture);'

        result = ScopeResolver().resolve_func(
            func_str)  # result is datetime obj
        result_str = result.strftime('%Y-%m-%d %H:%M:%S')
        self.assertEqual("2018-01-01 00:00:00", result_str)
    def test_func_datetime_parse_add_days(self):
        func_str = 'DateTime.Parse("2018-08-01").AddDays(3)'

        result = ScopeResolver().resolve_func(func_str)
        result_str = result.strftime('%Y-%m-%d')
        self.assertEqual("2018-08-04", result_str)