emmental/tests/mpris2/test_dbus.py

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")