()
| 29 | |
| 30 | |
| 31 | def 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 | |
| 48 | def test_authenticate(): |
no test coverage detected