def test_enabled_player_token_is_not_empty():
    field_data = DictFieldData({
        "enable_player_token": True,
        "expiration_time": 1234
    })
    player = OoyalaPlayerBlock(runtime, field_data, None)
    token_data = player.player_token()
    assert_not_equal(token_data['player_token'], '')
    assert_equal(token_data['player_token_expires'], 10**10 + 1234)
def test_disabled_player_token_is_empty():
    field_data = DictFieldData({"enable_player_token": False})
    player = OoyalaPlayerBlock(runtime, field_data, None)
    token_data = player.player_token()
    assert_equal(token_data['player_token'], '')
    assert_equal(token_data['player_token_expires'], None)
def test_disabled_player_token_is_empty():
    field_data = DictFieldData({"enable_player_token": False})
    player = OoyalaPlayerBlock(runtime, field_data, None)
    token_data = player.player_token()
    assert_equal(token_data['player_token'], '')
    assert_equal(token_data['player_token_expires'], None)
def test_enabled_player_token_is_not_empty():
    field_data = DictFieldData({"enable_player_token": True, "expiration_time": 1234})
    player = OoyalaPlayerBlock(runtime, field_data, None)
    token_data = player.player_token()
    assert_not_equal(token_data['player_token'], '')
    assert_equal(token_data['player_token_expires'], 10**10 + 1234)