File: test_root_application.py

package info (click to toggle)
at-spi2-core 2.57.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,140 kB
  • sloc: ansic: 44,803; xml: 1,480; python: 387; sh: 239; makefile: 28; javascript: 13
file content (24 lines) | stat: -rw-r--r-- 834 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Pytest will pick up this module automatically when running just "pytest".
#
# Each test_*() function gets passed test fixtures, which are defined
# in conftest.py.  So, a function "def test_foo(bar)" will get a bar()
# fixture created for it.

import pytest
import dbus

from utils import get_property, check_unknown_property_yields_error

APPLICATION_IFACE = 'org.a11y.atspi.Application'

def test_application_iface_properties(registry_root, session_manager):
    values = [
        ('ToolkitName',  'at-spi-registry'),
        ('Version',      '2.0'),
    ]

    for prop_name, expected in values:
        assert get_property(registry_root, APPLICATION_IFACE, prop_name) == expected

def test_unknown_property_yields_error(registry_root, session_manager):
    check_unknown_property_yields_error(registry_root, APPLICATION_IFACE)