def test_merge_attributes_test_with_str_dtype(self):
        ne = NetworkEdge()

        attrs = [
            Attribute(name='x', value=['1'], data_type='list_of_string'),
            Attribute(name='x', value='3')
        ]

        res = ne._merge_attributes(attrs_list=attrs)
        self.assertEqual('x', res.get_name())
        self.assertEqual(2, len(res.get_value()))
        self.assertTrue('1' in res.get_value())
        self.assertTrue('3' in res.get_value())
        self.assertEqual('list_of_string', res.get_data_type())
    def test_merge_attributes_test_where_dtype_mixed_string_none(self):
        ne = NetworkEdge()

        attrs = [
            Attribute(name='x', value='1', data_type='string'),
            Attribute(name='x', value='2')
        ]

        res = ne._merge_attributes(attrs_list=attrs)
        self.assertEqual('x', res.get_name())
        self.assertEqual(2, len(res.get_value()))
        self.assertTrue('1' in res.get_value())
        self.assertTrue('2' in res.get_value())
        self.assertEqual('list_of_string', res.get_data_type())
    def test_merge_attributes_test_with_integer_dtype(self):
        ne = NetworkEdge()

        attrs = [
            Attribute(name='x', value=1, data_type='integer'),
            Attribute(name='x', value=[2, 3], data_type='list_of_integer')
        ]

        res = ne._merge_attributes(attrs_list=attrs)
        self.assertEqual('x', res.get_name())
        self.assertEqual(3, len(res.get_value()))
        self.assertTrue(1 in res.get_value())
        self.assertTrue(2 in res.get_value())
        self.assertTrue(3 in res.get_value())
        self.assertEqual('list_of_integer', res.get_data_type())