def test_validation_passes_when_all_ascii_chars(self):
     original = {'Metadata': {'foo': 'bar'}}
     copied = original.copy()
     handlers.validate_ascii_metadata(original)
     self.assertEqual(original, copied)
 def test_validate_non_ascii_metadata_keys(self):
     with self.assertRaises(ParamValidationError):
         handlers.validate_ascii_metadata({'Metadata': {u'\u2713': 'bar'}})
 def test_validate_non_triggered_when_no_md_specified(self):
     original = {'NotMetadata': ''}
     copied = original.copy()
     handlers.validate_ascii_metadata(copied)
     self.assertEqual(original, copied)
 def test_validate_non_ascii_metadata_values(self):
     with self.assertRaises(ParamValidationError):
         handlers.validate_ascii_metadata({'Metadata': {'foo': u'\u2713'}})
Beispiel #5
0
 def test_validation_passes_when_all_ascii_chars(self):
     original = {'Metadata': {'foo': 'bar'}}
     copied = original.copy()
     handlers.validate_ascii_metadata(original)
     self.assertEqual(original, copied)
Beispiel #6
0
 def test_validate_non_triggered_when_no_md_specified(self):
     original = {'NotMetadata': ''}
     copied = original.copy()
     handlers.validate_ascii_metadata(copied)
     self.assertEqual(original, copied)
Beispiel #7
0
 def test_validate_non_ascii_metadata_keys(self):
     with self.assertRaises(ParamValidationError):
         handlers.validate_ascii_metadata(
             {'Metadata': {u'\u2713': 'bar'}})
Beispiel #8
0
 def test_validate_non_ascii_metadata_values(self):
     with self.assertRaises(ParamValidationError):
         handlers.validate_ascii_metadata({'Metadata': {'foo': u'\u2713'}})