コード例 #1
0
def test_is_meaningful_string_rejects_empty_string():
    assert not lib.is_meaningful_string(
        ""), "an empty string should be rejected"
コード例 #2
0
def test_is_meaningful_string_happy_path_fuzz():
    assert lib.is_meaningful_string("text"), "should be accepted"
コード例 #3
0
 def kernel_opts(self, value):
     assert lib.is_meaningful_string(value), \
         "kernel_opts must be a non-empty string: {}".format(value)
     self._prefs["kernel_opts"] = value
     return self
コード例 #4
0
 def default_user(self, value):
     assert lib.is_meaningful_string(value), \
         "default_user must be a non-empty string: {}".format(value)
     self._prefs["default_user"] = value
     return self
コード例 #5
0
 def template(self, value):
     assert lib.is_meaningful_string(value), \
         "template must be a non-empty string: {}".format(value)
     self._prefs["template"] = value
     return self
コード例 #6
0
 def netvm(self, value):
     assert lib.is_meaningful_string(value), \
         "netvm must be a non-empty string: {}".format(value)
     self._prefs["netvm"] = value
     return self
コード例 #7
0
 def management_dispvm(self, value):
     assert lib.is_meaningful_string(value), \
         "management_dispvm must be a non-empty string: {}".format(value)
     self._prefs["management_dispvm"] = value
     return self