norduniclient/tests/test_helpers.py
Benedith Mulongo 615835d57d
Some checks are pending
Python CI / test (push) Waiting to run
Improve norduniclient from nordunet
2024-10-10 16:37:08 +02:00

35 lines
811 B
Python

# -*- coding: utf-8 -*-
from __future__ import absolute_import
import unittest
from norduniclient import helpers
__author__ = 'lundberg'
class HelpersTests(unittest.TestCase):
def test_update_item_properties(self):
initial_props = {
'string': 'hello world',
'delete_me': 'byebye',
'list': ['hello', 'world'],
'int': 3
}
update_props = {
'string': 'hola el mundo',
'delete_me': '',
'list': ['hello'],
'int': 0
}
new_props = helpers.update_item_properties(initial_props, update_props)
expected_props = {
'string': 'hola el mundo',
'list': ['hello'],
'int': 0
}
self.assertEqual(new_props, expected_props)