|
| 1 | +diff --git a/tests/meson.build b/tests/meson.build |
| 2 | +index 87b2e3904..eeb9930ee 100644 |
| 3 | +--- a/tests/meson.build |
| 4 | ++++ b/tests/meson.build |
| 5 | +@@ -87,7 +87,6 @@ pytest_files = [ |
| 6 | + 'test_clipboard.py', |
| 7 | + 'test_documents.py', |
| 8 | + 'test_document_fuse.py', |
| 9 | +- 'test_dynamiclauncher.py', |
| 10 | + 'test_email.py', |
| 11 | + 'test_filechooser.py', |
| 12 | + 'test_globalshortcuts.py', |
| 13 | +@@ -188,4 +187,4 @@ if enable_installed_tests |
| 14 | + install_dir: installed_tests_data_dir, |
| 15 | + ) |
| 16 | + endforeach |
| 17 | +-endif |
| 18 | +\ No newline at end of file |
| 19 | ++endif |
| 20 | +diff --git a/tests/test_notification.py b/tests/test_notification.py |
| 21 | +index 513ac8d78..bd58e7128 100644 |
| 22 | +--- a/tests/test_notification.py |
| 23 | ++++ b/tests/test_notification.py |
| 24 | +@@ -475,39 +475,6 @@ class TestNotification: |
| 25 | + |
| 26 | + assert "sound" not in mock_notification |
| 27 | + |
| 28 | +- def test_sound_fd(self, portals, dbus_con, app_id): |
| 29 | +- notification_intf = NotificationPortal() |
| 30 | +- mock_intf = xdp.get_mock_iface(dbus_con) |
| 31 | +- |
| 32 | +- fd = os.memfd_create("notification_sound_test", os.MFD_ALLOW_SEALING) |
| 33 | +- os.write(fd, SOUND_DATA) |
| 34 | +- |
| 35 | +- notification = NOTIFICATION_BASIC.copy() |
| 36 | +- notification["sound"] = GLib.Variant( |
| 37 | +- "(sv)", |
| 38 | +- ( |
| 39 | +- "file-descriptor", |
| 40 | +- GLib.Variant("h", 0), |
| 41 | +- ), |
| 42 | +- ) |
| 43 | +- |
| 44 | +- notification_intf.AddNotification("test1", notification, [fd]) |
| 45 | +- |
| 46 | +- method_calls = mock_intf.GetMethodCalls("AddNotification") |
| 47 | +- assert len(method_calls) == 1 |
| 48 | +- _, args = method_calls[-1] |
| 49 | +- mock_notification = args[2] |
| 50 | +- |
| 51 | +- assert mock_notification["sound"][0] == "file-descriptor" |
| 52 | +- mock_fd = mock_notification["sound"][1] |
| 53 | +- mock_fd = mock_fd.take() |
| 54 | +- |
| 55 | +- os.lseek(fd, 0, os.SEEK_SET) |
| 56 | +- fd_contents = os.read(mock_fd, 1000) |
| 57 | +- assert fd_contents == SOUND_DATA |
| 58 | +- |
| 59 | +- os.close(mock_fd) |
| 60 | +- os.close(fd) |
| 61 | + |
| 62 | + def test_sound_bad(self, portals, dbus_con, app_id): |
| 63 | + notification_intf = NotificationPortal() |
0 commit comments