emmental/tests/mpris2/test_dbus.py
Anna Schumaker 767f0c1584 mpris2: Add an Mpris2 DBus Connection
And implement the MediaPlayer2 interface on top of it.

Implements: #7 ("Add MPRIS2 Support")
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2023-04-12 10:41:42 -04:00

25 lines
798 B
Python

# Copyright 2022 (c) Anna Schumaker.
"""Test our generic dbus object."""
import unittest
import emmental.mpris2.dbus
from gi.repository import GObject
class TestDbusObject(unittest.TestCase):
"""Tests our generic mpris2 object."""
def setUp(self):
"""Set up common variables."""
self.object = emmental.mpris2.dbus.Object()
def test_init(self):
"""Test that the object is set up properly."""
self.assertIsInstance(self.object, GObject.GObject)
self.assertIsNone(self.object.dbus)
self.assertIsNone(self.object.nodeinfo)
self.assertIsNone(self.object.interface)
self.assertEqual(self.object.registration, 0)
self.assertEqual(emmental.mpris2.dbus.OBJECT_PATH,
"/org/mpris/MediaPlayer2")