def test_setting_created_to_bad_string_raises_value_error( self, username, roles, created, expiration, issued_by, token_id, bad_date_string): token = Token(cid=username, r=roles, cts=created, ets=expiration, rcid=issued_by, tid=token_id) with pytest.raises(ValueError): token.created = bad_date_string
def test_setting_created_to_not_string_raises_type_error( self, username, roles, created, expiration, issued_by, token_id, not_string): token = Token(cid=username, r=roles, cts=created, ets=expiration, rcid=issued_by, tid=token_id) with pytest.raises(TypeError): token.created = not_string