예제 #1
0
def test_valid_standard_input_does_not_fail():
    create_fake_cred_file()
    vestaboard.Board().post(
        'abcdefghijklmnopqrstuvwxyz1234567890 !@#$()-+&=;:"%,./?°')
    vestaboard.Board().post('Triage Status:\n\n{63}Red - 24 files')
    vestaboard.Board().post('Character code at end {23}')
    vestaboard.Board().post('{64} Character code at beginning')
    remove_fake_cred_file()
예제 #2
0
def test_board_can_be_instantiated_with_an_installable_and_sub_id():
    apiKey = 'fakeApiKey'
    apiSecret = 'fakeApiSecret'
    subId = 'fakeSubId'

    i = vestaboard.Installable(apiKey=apiKey,
                               apiSecret=apiSecret,
                               getSubscription=False,
                               saveCredentials=False)
    vb = vestaboard.Board(i, subscriptionId=subId)
    vb.post('Should not error')
예제 #3
0
def test_valid_raw_input_does_not_fail():
    create_fake_cred_file()
    vestaboard.Board().raw(validRawChar)
    remove_fake_cred_file()
예제 #4
0
def test_invalid_standard_input_fails():
    with pytest.raises(Exception):
        create_fake_cred_file()
        vestaboard.Board().post('^')
        remove_fake_cred_file()
예제 #5
0
def test_raw_input_fails_if_nested_lists_not_contain_all_numbers():
    with pytest.raises(ValueError):
        vestaboard.Board().raw(invalidRawChar)
예제 #6
0
def test_raw_input_fails_if_nested_lists_not_contain_22_characters():
    with pytest.raises(ValueError):
        vestaboard.Board().raw([[], [], [], [], [], []])
예제 #7
0
def test_raw_input_fails_if_not_contains_nested_lists():
    with pytest.raises(ValueError):
        vestaboard.Board().raw(['this is a string, not a list'])
예제 #8
0
def test_raw_input_fails_if_not_contains_six_items():
    with pytest.raises(ValueError):
        vestaboard.Board().raw([])
예제 #9
0
def test_raw_input_fails_if_not_a_list():
    with pytest.raises(ValueError):
        vestaboard.Board().raw('not a list')
예제 #10
0
def test_board_instance_fails_with_no_file():
    with pytest.raises(ValueError):
        vestaboard.Board()