@@ -122,20 +122,22 @@ def test_resolve_imports(
122
122
import_names = [
123
123
"foo" , # cool
124
124
"bar" , # cool
125
+ "{another}foo" , # another foo
125
126
"{thug}life" , # life class exists add alias
126
127
"{common}type" , # type class doesn't exist add just the name
127
128
]
128
129
self .resolver .class_map = {class_life .qname : class_life }
129
130
mock_import_classes .return_value = import_names
130
- mock_find_package .side_effect = ["first" , "second" , "third" , "forth" ]
131
+ mock_find_package .side_effect = ["first" , "second" , "third" , "forth" , "fifth" ]
131
132
132
133
self .resolver .resolve_imports ()
133
134
mock_add_import .assert_has_calls (
134
135
[
135
136
mock .call (qname = import_names [0 ], package = "first" , exists = False ),
136
137
mock .call (qname = import_names [1 ], package = "second" , exists = False ),
137
138
mock .call (qname = import_names [2 ], package = "third" , exists = True ),
138
- mock .call (qname = import_names [3 ], package = "forth" , exists = False ),
139
+ mock .call (qname = import_names [3 ], package = "forth" , exists = True ),
140
+ mock .call (qname = import_names [4 ], package = "fifth" , exists = False ),
139
141
]
140
142
)
141
143
0 commit comments