22 lines
663 B
Python
22 lines
663 B
Python
# Copyright 2022 (c) Anna Schumaker.
|
|
"""Tests our Now Playing card."""
|
|
import unittest
|
|
import emmental
|
|
from gi.repository import Gtk
|
|
|
|
|
|
class TestNowPlaying(unittest.TestCase):
|
|
"""Test case for our custom Now Playing card."""
|
|
|
|
def setUp(self):
|
|
"""Set up common variables."""
|
|
self.card = emmental.nowplaying.Card()
|
|
|
|
def test_init(self):
|
|
"""Test that the card has been initialized correctly."""
|
|
self.assertIsInstance(self.card, Gtk.Box)
|
|
self.assertIsInstance(self.card._grid, Gtk.Grid)
|
|
|
|
self.assertEqual(self.card.get_last_child(), self.card._grid)
|
|
self.assertTrue(self.card.has_css_class("card"))
|