File: test_dotdict.py

package info (click to toggle)
wfuzz 2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,244 kB
  • sloc: python: 8,786; makefile: 49; sh: 4
file content (17 lines) | stat: -rw-r--r-- 474 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import unittest

from wfuzz.utils import DotDict


class FilterDotDict(unittest.TestCase):
    def __init__(self, *args, **kwargs):
        super(FilterDotDict, self).__init__(*args, **kwargs)
        self.maxDiff = 1000

    def test_code_set(self):
        dd = DotDict({'a': '1'})
        dd2 = DotDict({'a': '2'})

        self.assertEqual(dd + "test", {'a': "1test"})
        self.assertEqual("test" + dd, {'a': "test1"})
        self.assertEqual(dd + dd2, {'a': "2"})