Exemplo n.º 1
0
    def test_save_overwrites(self):
        path = tempfile.mktemp()

        # create config
        created_data = config.create(self.btctxstore, path)

        # update config
        updated_data = copy.deepcopy(created_data)
        updated_data["payout_address"] = "1A8WqiJDh3tGVeEefbMN5BVDYxx2XSoWgG"
        config.save(self.btctxstore, path, updated_data)

        # confirm overwriten
        loaded_data = config.get(self.btctxstore, path)
        self.assertEqual(updated_data, loaded_data)
        os.remove(path)
Exemplo n.º 2
0
    def test_save_overwrites(self):
        path = tempfile.mktemp()

        # create config
        created_data = config.create(self.btctxstore, path)

        # update config
        updated_data = copy.deepcopy(created_data)
        updated_data["payout_address"] = "1A8WqiJDh3tGVeEefbMN5BVDYxx2XSoWgG"
        config.save(self.btctxstore, path, updated_data)

        # confirm overwriten
        loaded_data = config.get(self.btctxstore, path)
        self.assertEqual(updated_data, loaded_data)
        os.remove(path)
Exemplo n.º 3
0
 def test_roundtrip_unencrypted(self):
     path = tempfile.mktemp()
     saved_data = config.create(self.btctxstore, path)
     loaded_data = config.get(self.btctxstore, path)
     self.assertEqual(saved_data, loaded_data)
     os.remove(path)
Exemplo n.º 4
0
 def test_roundtrip_unencrypted(self):
     path = tempfile.mktemp()
     saved_data = config.create(self.btctxstore, path)
     loaded_data = config.get(self.btctxstore, path)
     self.assertEqual(saved_data, loaded_data)
     os.remove(path)