MCPcopy Index your code
hub / github.com/spaceandtimefdn/SxT-Python-SDK / test_peripheral_functions

Function test_peripheral_functions

tests/test_sxtbaseapi.py:31–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29
30
31def test_peripheral_functions():
32 sxtb = SXTBaseAPI()
33
34 # prep biscuits
35 assert ['a','b','c'] == sxtb.prep_biscuits(['a','b','c'])
36 assert ['a','b','c','d','e'] == sxtb.prep_biscuits(['a','b',['c','d','e']])
37 assert ['a','b','c','d','e'] == sxtb.prep_biscuits([['a','b'],['c','d','e']])
38 bf = SXTBiscuit(biscuit_token='f')
39 bg = SXTBiscuit(biscuit_token='g')
40 assert ['a','b','c','d','e','f','g'] == sxtb.prep_biscuits([['a','b'],['c','d','e'],bf, bg])
41
42 # prep sql - removes newlines, tabs, double spaces, and trailing ';', except where they appear inside a string
43 assert 'select * from schema.mytable' == sxtb.prep_sql('\n select * \n\tfrom schema.mytable ')
44 assert 'select * from schema.mytable' == sxtb.prep_sql(' select * from schema.mytable')
45 assert 'select "some \tstring" as colA from schema.mytable' == sxtb.prep_sql(' select "some \tstring" as colA \nfrom schema.mytable; ')
46
47
48def test_authenticate():

Callers 1

test_sxtbaseapi.pyFile · 0.85

Calls 4

prep_biscuitsMethod · 0.95
prep_sqlMethod · 0.95
SXTBaseAPIClass · 0.90
SXTBiscuitClass · 0.90

Tested by

no test coverage detected