File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -94,21 +94,21 @@ def test_export_zone_to_bind_format_success(self):
94
94
lines1 = result .split ("\n " )
95
95
lines2 = content .split ("\n " )
96
96
97
- date_str = "{}-{}-{} {}:{}:{}" .format (
97
+ date_str = r "{}-{}-{} {}:{}:{}" .format (
98
98
now .year ,
99
99
zero_pad (now .month ),
100
100
zero_pad (now .day ),
101
101
zero_pad (now .hour ),
102
- zero_pad ( now . minute ) ,
103
- zero_pad ( now . second ) ,
102
+ r"\d+" ,
103
+ r"\d+" ,
104
104
)
105
- expected_header = "; Generated by Libcloud v{} on {} UTC" .format (
105
+ expected_header = r "; Generated by Libcloud v{} on {} UTC" .format (
106
106
__version__ ,
107
107
date_str ,
108
108
)
109
109
110
- self .assertEqual (lines1 [0 ], expected_header )
111
- self .assertEqual (lines2 [0 ], expected_header )
110
+ self .assertRegex (lines1 [0 ], expected_header )
111
+ self .assertRegex (lines2 [0 ], expected_header )
112
112
113
113
for lines in [lines1 , lines2 ]:
114
114
self .assertEqual (len (lines ), 2 + 1 + 9 )
You can’t perform that action at this time.
0 commit comments