MCPcopy Create free account
hub / github.com/StackStorm/st2 / test_startswith

Method test_startswith

st2common/tests/unit/test_operators.py:1029–1039  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1027 )
1028
1029 def test_startswith(self):
1030 op = operators.get_operator("startswith")
1031 self.assertTrue(op("hasystack needle haystack", "hasystack"))
1032 self.assertTrue(op("a hasystack needle haystack", "a "))
1033
1034 # Mixing bytes and strings / unicode should still work
1035 self.assertTrue(op(b"haystack needle", "haystack"))
1036 self.assertTrue(op("haystack needle", b"haystack"))
1037 self.assertTrue(op(b"haystack needle", b"haystack"))
1038 self.assertTrue(op(b"haystack needle", "haystack"))
1039 self.assertTrue(op("haystack needle", b"haystack"))
1040
1041 def test_startswith_fail(self):
1042 op = operators.get_operator("startswith")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected