예제 #1
0
 def test_distill_multi_list_tuple(self):
     self.assertEqual(
         _distill_params(
             ([("foo", "bar")], [("bar", "bat")]),
             {}
         ),
         ([('foo', 'bar')], [('bar', 'bat')])
     )
예제 #2
0
 def test_distill_single_list_dicts(self):
     self.assertEqual(
         _distill_params(([{
             "foo": "bar"
         }, {
             "foo": "hoho"
         }], ), {}), [{
             'foo': 'bar'
         }, {
             'foo': 'hoho'
         }])
예제 #3
0
 def test_distill_single_list_strings(self):
     self.assertEqual(
         _distill_params((["foo", "bar"],), {}),
         [["foo", "bar"]]
     )
예제 #4
0
 def test_distill_dict_multi_empty_param(self):
     self.assertEqual(
         _distill_params((), {"foo": "bar"}),
         [{"foo": "bar"}]
     )
예제 #5
0
def test_distill_dict_multi_none_param():
    assert _distill_params(None, {"foo": "bar"}) == [{"foo": "bar"}]
예제 #6
0
 def test_distill_single_list_tuples(self):
     self.assertEqual(
         _distill_params(([("foo", "bar"), ("bat", "hoho")], ), {}),
         [('foo', 'bar'), ('bat', 'hoho')])
예제 #7
0
 def test_distill_dict_multi_none_param(self):
     self.assertEqual(_distill_params(None, {"foo": "bar"}), [{
         "foo": "bar"
     }])
예제 #8
0
 def test_distill_single_list_dicts(self):
     self.assertEqual(
         _distill_params(([{"foo": "bar"}, {"foo": "hoho"}],), {}),
         [{'foo': 'bar'}, {'foo': 'hoho'}]
     )
예제 #9
0
def test_distill_multi_strings():
    assert _distill_params(("foo", "bar"), {}) == [('foo', 'bar')]
예제 #10
0
def test_distill_multi_list_tuple():
    v1 = _distill_params(
        ([("foo", "bar")], [("bar", "bat")]),
        {})
    v2 = ([('foo', 'bar')], [('bar', 'bat')])
    assert v1 == v2
예제 #11
0
def test_distill_single_list_tuple():
    v1 = _distill_params(([("foo", "bar")],), {})
    v2 = [('foo', 'bar')]
    assert v1 == v2
예제 #12
0
def test_distill_single_list_tuples():
    v1 = _distill_params(([("foo", "bar"), ("bat", "hoho")],), {})
    v2 = [('foo', 'bar'), ('bat', 'hoho')]
    assert v1 == v2
예제 #13
0
def test_distill_single_list_strings():
    assert _distill_params((["foo", "bar"],), {}) == [["foo", "bar"]]
예제 #14
0
def test_distill_single_dict():
    assert _distill_params(({"foo": "bar"},), {}) == [{"foo": "bar"}]
예제 #15
0
def test_distill_dict_multi_empty_param():
    assert _distill_params((), {"foo": "bar"}) == [{"foo": "bar"}]
예제 #16
0
 def test_distill_single_list_tuple(self):
     self.assertEqual(
         _distill_params(([("foo", "bar")],), {}),
         [('foo', 'bar')]
     )
예제 #17
0
 def test_distill_multi_strings(self):
     self.assertEqual(
         _distill_params(("foo", "bar"), {}),
         [('foo', 'bar')]
     )
예제 #18
0
def test_distill_single_list_dicts():
    v1 = _distill_params(([{"foo": "bar"}, {"foo": "hoho"}],), {})
    assert v1 == [{'foo': 'bar'}, {'foo': 'hoho'}]
예제 #19
0
 def test_distill_multi_string_tuple(self):
     self.assertEqual(
         _distill_params((("arg", "arg"),), {}),
         [("arg", "arg")]
     )
예제 #20
0
def test_distill_single_string():
    assert _distill_params(("arg",), {}) == [["arg"]]
예제 #21
0
 def test_distill_single_dict(self):
     self.assertEqual(_distill_params(({
         "foo": "bar"
     }, ), {}), [{
         "foo": "bar"
     }])
예제 #22
0
def test_distill_none():
    assert _distill_params(None, None) == []
예제 #23
0
 def test_distill_multi_list_tuple(self):
     self.assertEqual(
         _distill_params(([("foo", "bar")], [("bar", "bat")]), {}),
         ([('foo', 'bar')], [('bar', 'bat')]))
예제 #24
0
def test_distill_multi_string_tuple():
    v1 = _distill_params((("arg", "arg"),), {})
    assert v1 == [("arg", "arg")]
예제 #25
0
 def test_distill_multi_string_tuple(self):
     self.assertEqual(_distill_params((("arg", "arg"), ), {}),
                      [("arg", "arg")])
예제 #26
0
def test_distill_single_list_tuples():
    v1 = _distill_params(([("foo", "bar"), ("bat", "hoho")],), {})
    v2 = [('foo', 'bar'), ('bat', 'hoho')]
    assert v1 == v2
예제 #27
0
 def test_distill_dict_multi_none_param(self):
     self.assertEqual(
         _distill_params(None, {"foo": "bar"}),
         [{"foo": "bar"}]
     )
예제 #28
0
def test_distill_no_multi_no_param():
    assert _distill_params((), {}) == []
예제 #29
0
 def test_distill_single_dict(self):
     self.assertEqual(
         _distill_params(({"foo": "bar"},), {}),
         [{"foo": "bar"}]
     )
예제 #30
0
def test_distill_dict_multi_none_param():
    assert _distill_params(None, {"foo": "bar"}) == [{"foo": "bar"}]
예제 #31
0
 def test_distill_single_list_tuples(self):
     self.assertEqual(
         _distill_params(([("foo", "bar"), ("bat", "hoho")],), {}),
         [('foo', 'bar'), ('bat', 'hoho')]
     )
예제 #32
0
def test_distill_dict_multi_empty_param():
    assert _distill_params((), {"foo": "bar"}) == [{"foo": "bar"}]
예제 #33
0
def test_distill_single_dict():
    assert _distill_params(({"foo": "bar"}, ), {}) == [{"foo": "bar"}]
예제 #34
0
def test_distill_single_list_strings():
    assert _distill_params((["foo", "bar"], ), {}) == [["foo", "bar"]]
예제 #35
0
 def test_distill_none(self):
     self.assertEqual(
         _distill_params(None, None),
         []
     )
예제 #36
0
def test_distill_single_list_tuple():
    v1 = _distill_params(([("foo", "bar")], ), {})
    v2 = [("foo", "bar")]
    assert v1 == v2
예제 #37
0
 def test_distill_single_string(self):
     self.assertEqual(
         _distill_params(("arg",), {}),
         [["arg"]]
     )
예제 #38
0
def test_distill_multi_list_tuple():
    v1 = _distill_params(([("foo", "bar")], [("bar", "bat")]), {})
    v2 = ([("foo", "bar")], [("bar", "bat")])
    assert v1 == v2
예제 #39
0
 def test_distill_no_multi_no_param(self):
     self.assertEqual(_distill_params((), {}), [])
예제 #40
0
def test_distill_multi_strings():
    assert _distill_params(("foo", "bar"), {}) == [("foo", "bar")]
예제 #41
0
 def test_distill_dict_multi_empty_param(self):
     self.assertEqual(_distill_params((), {"foo": "bar"}), [{"foo": "bar"}])
예제 #42
0
def test_distill_single_list_dicts():
    v1 = _distill_params(([{"foo": "bar"}, {"foo": "hoho"}], ), {})
    assert v1 == [{"foo": "bar"}, {"foo": "hoho"}]
예제 #43
0
 def test_distill_single_list_strings(self):
     self.assertEqual(_distill_params((["foo", "bar"], ), {}),
                      [["foo", "bar"]])
예제 #44
0
def test_distill_single_string():
    assert _distill_params(("arg", ), {}) == [["arg"]]
예제 #45
0
 def test_distill_single_list_tuple(self):
     self.assertEqual(_distill_params(([("foo", "bar")], ), {}),
                      [('foo', 'bar')])
예제 #46
0
def test_distill_multi_string_tuple():
    v1 = _distill_params((("arg", "arg"), ), {})
    assert v1 == [("arg", "arg")]
예제 #47
0
 def test_distill_multi_strings(self):
     self.assertEqual(_distill_params(("foo", "bar"), {}), [('foo', 'bar')])
예제 #48
0
def test_distill_none():
    assert _distill_params(None, None) == []
예제 #49
0
 def test_distill_single_string(self):
     self.assertEqual(_distill_params(("arg", ), {}), [["arg"]])
예제 #50
0
 def test_distill_no_multi_no_param(self):
     self.assertEqual(
         _distill_params((), {}),
         []
     )
예제 #51
0
 def test_distill_none(self):
     self.assertEqual(_distill_params(None, None), [])
예제 #52
0
def test_distill_no_multi_no_param():
    assert _distill_params((), {}) == []