26 lines
865 B
Python
26 lines
865 B
Python
# Copyright 2024 (c) Anna Schumaker.
|
|
"""Tests our Listenbrainz User Token entry."""
|
|
import emmental.header.listenbrainz
|
|
import unittest
|
|
from gi.repository import Gtk
|
|
from gi.repository import Adw
|
|
|
|
|
|
class TestListenbrainzRow(unittest.TestCase):
|
|
"""Test the ListenBrainzRow."""
|
|
|
|
def setUp(self):
|
|
"""Set up common variables."""
|
|
self.row = emmental.header.listenbrainz.ListenBrainzRow()
|
|
|
|
def test_init(self):
|
|
"""Test that the ListenBrainzRow was set up properly."""
|
|
self.assertIsInstance(self.row, Adw.PasswordEntryRow)
|
|
self.assertIsInstance(self.row.prefix, Gtk.Image)
|
|
|
|
self.assertEqual(self.row.props.title, "ListenBrainz User Token")
|
|
self.assertTrue(self.row.props.show_apply_button)
|
|
|
|
self.assertEqual(self.row.prefix.props.icon_name,
|
|
"listenbrainz-logo-symbolic")
|