Exemplo n.º 1
0
 def test_empty_dictionary_signal_value_is_not_empty(self):
     assert is_non_empty_attribute(EMPTY_DICT) is True
Exemplo n.º 2
0
 def test_awsobject_with_only_empty_attributes_is_empty(self):
     assert is_non_empty_attribute(DualAttributeObject(one=[],
                                                       two={})) is False
Exemplo n.º 3
0
 def test_empty_list_signal_value_is_not_empty(self):
     assert is_non_empty_attribute(EMPTY_LIST) is True
Exemplo n.º 4
0
 def test_awsobject_with_some_attributes_is_not_empty(self):
     assert is_non_empty_attribute(DualAttributeObject(one=42)) is True
Exemplo n.º 5
0
 def test_awsobject_with_no_attributes_set_is_empty(self):
     assert is_non_empty_attribute(DualAttributeObject()) is False
Exemplo n.º 6
0
 def test_non_empty_dictionary_with_only_empty_values_is_empty(self):
     assert is_non_empty_attribute({"a": {}, "b": [[]]}) is False
Exemplo n.º 7
0
 def test_non_empty_dictionary_with_some_empty_values_is_not_empty(self):
     assert is_non_empty_attribute({"a": {}, "b": 1}) is True
Exemplo n.º 8
0
 def test_empty_dictionary_is_empty(self):
     assert is_non_empty_attribute({}) is False
Exemplo n.º 9
0
 def test_non_empty_dictionary_is_not_empty(self):
     assert is_non_empty_attribute({"a": 1}) is True
Exemplo n.º 10
0
 def test_non_empty_list_with_only_empty_values_is_empty(self):
     assert is_non_empty_attribute([[], [], [[]]]) is False
Exemplo n.º 11
0
 def test_non_empty_list_with_some_empty_values_is_not_empty(self):
     assert is_non_empty_attribute([[], [], 1, [[]]]) is True
Exemplo n.º 12
0
 def test_non_empty_list_is_not_empty(self):
     assert is_non_empty_attribute([1]) is True
Exemplo n.º 13
0
 def test_empty_list_is_empty(self):
     assert is_non_empty_attribute([]) is False
Exemplo n.º 14
0
 def test_non_empty_string_is_not_empty(self):
     assert is_non_empty_attribute("hello") is True
Exemplo n.º 15
0
 def test_none_is_not_empty(self):
     assert is_non_empty_attribute(None) is True
Exemplo n.º 16
0
 def test_awsobject_with_no_attributes_but_unknown_attributes_set_is_not_empty(
         self):
     data = ZeroAttributeObject()
     data.set_unknown_aws_attribute("foo", "bar")
     assert is_non_empty_attribute(data) is True