()
| 48 | |
| 49 | |
| 50 | def test_sxt_exceptions(): |
| 51 | mylogger.info(f'\n\ntest_sxt_exceptions\n{"-"*30}') |
| 52 | # test common exceptions |
| 53 | sxt = SpaceAndTime() |
| 54 | sxt.user.user_id = sxt.user.api_key = '' |
| 55 | with pytest.raises(Exception) as e_info: sxt.authenticate() |
| 56 | |
| 57 | sxt = SpaceAndTime() |
| 58 | sxt.user.private_key = sxt.user.api_key = '' |
| 59 | with pytest.raises(Exception) as e_info: sxt.authenticate() |
| 60 | |
| 61 | with pytest.raises(SxTAuthenticationError) as errinfo: raise SxTAuthenticationError('test message: SxTAuthenticationError') |
| 62 | with pytest.raises(SxTQueryError) as errinfo: raise SxTQueryError('test message: SxTQueryError') |
| 63 | with pytest.raises(SxTFileContentError) as errinfo: raise SxTFileContentError('test message: SxTFileContentError') |
| 64 | with pytest.raises(SxTArgumentError) as errinfo: raise SxTArgumentError('test message: SxTArgumentError') |
| 65 | with pytest.raises(SxTKeyEncodingError) as errinfo: raise SxTKeyEncodingError('test message: SxTKeyEncodingError') |
| 66 | with pytest.raises(SxTBiscuitError) as errinfo: raise SxTBiscuitError('test message: SxTBiscuitError') |
| 67 | with pytest.raises(SxTAPINotDefinedError) as errinfo: raise SxTAPINotDefinedError('test message: SxTAPINotDefinedError') |
| 68 | with pytest.raises(SxTAPINotSuccessfulError) as errinfo: raise SxTAPINotSuccessfulError('test message: SxTAPINotSuccessfulError') |
| 69 | |
| 70 | |
| 71 | def test_sxt_wrapper(): |
nothing calls this directly
no test coverage detected