@@ -224,6 +224,22 @@ def test_valid(self):
224
224
errors
225
225
)
226
226
227
+ @patch ('os.path.basename' , return_value = "valid1-Addon_id" )
228
+ def test_valid_withSymbols (self , mock_basename ):
229
+ """ Error when submission does not include correct addonId format
230
+ """
231
+ self .submissionData ['addonId' ] = "valid1-Addon_id"
232
+ self .manifest ['name' ] = "valid1-Addon_id"
233
+ errors = list (
234
+ validate .checkAddonId (self .manifest , VALID_SUBMISSION_JSON_FILE , self .submissionData )
235
+ )
236
+
237
+ self .assertEqual (
238
+ [ # expected errors
239
+ ],
240
+ errors
241
+ )
242
+
227
243
def test_invalidPath (self ):
228
244
""" Error when submission path does not include correct addon ID
229
245
"""
@@ -296,7 +312,7 @@ def test_invalidAddonIdFormat_spaces(self, mock_basename):
296
312
[ # expected errors
297
313
"Submission data 'addonId' field does not match the expected format:"
298
314
" must start and end with a letter, and contain only letters,"
299
- " numbers, and hyphens. "
315
+ " numbers, underscores, and hyphens. "
300
316
"ID: invalid addon id"
301
317
],
302
318
errors
@@ -316,7 +332,7 @@ def test_invalidAddonIdFormat_invalidStartChar(self, mock_basename):
316
332
[ # expected errors
317
333
"Submission data 'addonId' field does not match the expected format:"
318
334
" must start and end with a letter, and contain only letters,"
319
- " numbers, and hyphens. "
335
+ " numbers, underscores, and hyphens. "
320
336
"ID: 1invalid-addon-id"
321
337
],
322
338
errors
0 commit comments