@@ -224,6 +224,22 @@ def test_valid(self):
224224 errors
225225 )
226226
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+
227243 def test_invalidPath (self ):
228244 """ Error when submission path does not include correct addon ID
229245 """
@@ -296,7 +312,7 @@ def test_invalidAddonIdFormat_spaces(self, mock_basename):
296312 [ # expected errors
297313 "Submission data 'addonId' field does not match the expected format:"
298314 " must start and end with a letter, and contain only letters,"
299- " numbers, and hyphens. "
315+ " numbers, underscores, and hyphens. "
300316 "ID: invalid addon id"
301317 ],
302318 errors
@@ -316,7 +332,7 @@ def test_invalidAddonIdFormat_invalidStartChar(self, mock_basename):
316332 [ # expected errors
317333 "Submission data 'addonId' field does not match the expected format:"
318334 " must start and end with a letter, and contain only letters,"
319- " numbers, and hyphens. "
335+ " numbers, underscores, and hyphens. "
320336 "ID: 1invalid-addon-id"
321337 ],
322338 errors
0 commit comments