Beispiel #1
0
 def test_dict(self):
     source = {"url": "foo/bar", "id": 1}
     expected = {"url": "foo%2Fbar", "id": 1}
     self.assertEqual(expected, gitlab._sanitize(source))
Beispiel #2
0
 def test_slash(self):
     self.assertEqual("foo%2Fbar", gitlab._sanitize("foo/bar"))
Beispiel #3
0
 def test_do_nothing(self):
     self.assertEqual(1, gitlab._sanitize(1))
     self.assertEqual(1.5, gitlab._sanitize(1.5))
     self.assertEqual("foo", gitlab._sanitize("foo"))
Beispiel #4
0
 def test_dict(self):
     source = {"url": "foo/bar", "id": 1}
     expected = {"url": "foo%2Fbar", "id": 1}
     self.assertEqual(expected, gitlab._sanitize(source))
Beispiel #5
0
 def test_slash(self):
     self.assertEqual("foo%2Fbar", gitlab._sanitize("foo/bar"))
Beispiel #6
0
 def test_do_nothing(self):
     self.assertEqual(1, gitlab._sanitize(1))
     self.assertEqual(1.5, gitlab._sanitize(1.5))
     self.assertEqual("foo", gitlab._sanitize("foo"))