We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe8c95f commit 3c46595Copy full SHA for 3c46595
1 file changed
pyswagger/tests/test_getter.py
@@ -1,4 +1,5 @@
1
from pyswagger import SwaggerApp
2
+from pyswagger.getter import UrlGetter
3
from .utils import get_test_data_folder
4
import unittest
5
import os
@@ -26,5 +27,19 @@ def test_random_name_v1_2(self):
26
27
which='random_file_name'
28
)
29
path = os.path.join(path, 'test_random.json')
- # should not raise ValueError
30
+ # should not raise ValueError
31
app = SwaggerApp.create(path)
32
+
33
+ def test_local_path_with_custome_getter(self):
34
+ """ make sure path would be assigned when
35
+ passing a getter class
36
+ """
37
+ cls = UrlGetter
38
+ path = get_test_data_folder(
39
+ version='2.0',
40
+ which='random_file_name'
41
+ )
42
+ path = os.path.join(path, 'test_random.json')
43
44
+ # should not raise errors
45
+ app = SwaggerApp.load(path, getter=cls)
0 commit comments