Merge pull request #806 from wschin/fix-a-path
Fix a path so that a test can run on Windows
This commit is contained in:
@@ -21,6 +21,7 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
import json
|
import json
|
||||||
import random
|
import random
|
||||||
|
import uuid
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import logging
|
import logging
|
||||||
@@ -527,7 +528,7 @@ class ConfigTester(object):
|
|||||||
|
|
||||||
def create_and_test_config_to_json_file(self):
|
def create_and_test_config_to_json_file(self):
|
||||||
config_first = self.config_class(**self.inputs_dict)
|
config_first = self.config_class(**self.inputs_dict)
|
||||||
json_file_path = "/tmp/config.json"
|
json_file_path = os.path.join(os.getcwd(), "config_" + str(uuid.uuid4()) + ".json")
|
||||||
config_first.to_json_file(json_file_path)
|
config_first.to_json_file(json_file_path)
|
||||||
config_second = self.config_class.from_json_file(json_file_path)
|
config_second = self.config_class.from_json_file(json_file_path)
|
||||||
os.remove(json_file_path)
|
os.remove(json_file_path)
|
||||||
|
|||||||
Reference in New Issue
Block a user