예제 #1
0
class TestConfigurationSerializer(TestCase):
    def setUp(self):
        self.config = StdmConfiguration.instance()
        self.serializer = ConfigurationFileSerializer(config_path)

    def tearDown(self):
        self.config = None

    def test_save(self):
        populate_configuration(self.config)

        self.serializer.save()

        update_result = True

        #Hardwire result
        self.assertTrue(update_result)

    def test_load(self):
        self.serializer.load()

        read_result = True

        #Hardwire result
        self.assertTrue(read_result)
예제 #2
0
def save_configuration():
    """
    A util method for saving the configuration instance to the default
    file location.
    """
    config_path = QDesktopServices.storageLocation(QDesktopServices.HomeLocation) \
                  + '/.stdm/configuration.stc'
    conf_serializer = ConfigurationFileSerializer(config_path)
    conf_serializer.save()
예제 #3
0
파일: __init__.py 프로젝트: gltn/stdm
def save_configuration():
    """
    A util method for saving the configuration instance to the default
    file location.
    """
    config_path = QStandardPaths.standardLocations(QStandardPaths.HomeLocation)[0] \
                  + '/.stdm/configuration.stc'
    conf_serializer = ConfigurationFileSerializer(config_path)
    conf_serializer.save()
예제 #4
0
파일: __init__.py 프로젝트: gltn/stdm
def save_configuration():
    """
    A util method for saving the configuration instance to the default
    file location.
    """
    config_path = QDesktopServices.storageLocation(QDesktopServices.HomeLocation) \
                      + '/.stdm/configuration.stc'
    conf_serializer = ConfigurationFileSerializer(config_path)
    conf_serializer.save()
예제 #5
0
class TestConfigurationSerializer(TestCase):
    def setUp(self):
        self.config = StdmConfiguration.instance()
        self.serializer = ConfigurationFileSerializer(config_path)

    def tearDown(self):
        self.config = None

    def test_save(self):
        populate_configuration(self.config)

        self.serializer.save()

        update_result = True

        self.assertTrue(update_result)

    def test_load(self):
        self.serializer.load()

        read_result = True

        self.assertTrue(read_result)