test_data_application.py 479 Bytes
Newer Older
Lukáš Lalinský's avatar
Lukáš Lalinský committed
1
# Copyright (C) 2011 Lukas Lalinsky
2
# Distributed under the MIT license, see the LICENSE file for details.
Lukáš Lalinský's avatar
Lukáš Lalinský committed
3

4 5
from nose.tools import assert_equals
from tests import with_database
Lukáš Lalinský's avatar
Lukáš Lalinský committed
6 7 8 9 10
from acoustid.data.application import lookup_application_id_by_apikey


@with_database
def test_lookup_application_id_by_apikey(conn):
11
    id = lookup_application_id_by_apikey(conn, 'app1key')
Lukáš Lalinský's avatar
Lukáš Lalinský committed
12 13 14
    assert_equals(1, id)
    id = lookup_application_id_by_apikey(conn, 'foooo')
    assert_equals(None, id)