|
24 | 24 |
|
25 | 25 | from bson import json_util
|
26 | 26 |
|
27 |
| -from pymongo.mongo_client import MongoClient |
28 | 27 | from pymongo.write_concern import WriteConcern
|
29 | 28 |
|
30 | 29 | from test import client_context, unittest, IntegrationTest
|
@@ -239,13 +238,13 @@ def test_case(self):
|
239 | 238 | for test_spec in cls.TEST_SPEC['tests']:
|
240 | 239 | description = test_spec['description']
|
241 | 240 | test_name = 'test_%s' % (
|
242 |
| - description.replace(' ', '_').replace('.', '_').lower(),) |
| 241 | + description.replace(' ', '_').replace('.', '_'),) |
243 | 242 | test_method = create_test(copy.deepcopy(test_spec))
|
244 | 243 | test_method.__name__ = test_name
|
245 | 244 | setattr(cls, test_name, test_method)
|
246 | 245 |
|
247 | 246 |
|
248 |
| -def generate_test_classes(test_path, name_prefix=''): |
| 247 | +def generate_test_classes(test_path, module=__name__, name_prefix=''): |
249 | 248 | """Method for generating test classes. Returns a dictionary where keys are
|
250 | 249 | the names of test classes and values are the test class objects."""
|
251 | 250 | test_klasses = {}
|
@@ -281,6 +280,6 @@ class SpecTestBase(with_metaclass(UnifiedSpecTestMeta)):
|
281 | 280 | test_klasses[class_name] = type(
|
282 | 281 | class_name,
|
283 | 282 | (UnifiedSpecTestMixin, test_base_class_factory(scenario_def),),
|
284 |
| - {}) |
| 283 | + {'__module__': module}) |
285 | 284 |
|
286 | 285 | return test_klasses
|
0 commit comments