File: test_LinuxDeployGtkPlugin__properties.py

package info (click to toggle)
python-briefcase 0.3.22-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,300 kB
  • sloc: python: 59,405; makefile: 57
file content (37 lines) | stat: -rw-r--r-- 1,132 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import pytest

from briefcase.integrations.linuxdeploy import LinuxDeployGtkPlugin

from ...utils import assert_url_resolvable


@pytest.fixture
def linuxdeploy_gtk_plugin(mock_tools):
    return LinuxDeployGtkPlugin(mock_tools)


def test_file_path(linuxdeploy_gtk_plugin, mock_tools):
    """Default Linuxdeploy plugins reside in the linuxdeploy plugins path."""
    assert (
        linuxdeploy_gtk_plugin.file_path
        == mock_tools.base_path / "linuxdeploy_plugins/gtk"
    )


def test_file_name(linuxdeploy_gtk_plugin):
    """GTK plugin has a known name."""
    assert linuxdeploy_gtk_plugin.file_name == "linuxdeploy-plugin-gtk.sh"


def test_plugin_id(linuxdeploy_gtk_plugin):
    """GTK plugin ID is fixed."""
    assert linuxdeploy_gtk_plugin.plugin_id == "gtk"


def test_download_url(linuxdeploy_gtk_plugin):
    """GTK plugin download URL is architecture dependent."""
    assert linuxdeploy_gtk_plugin.download_url == (
        "https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/"
        "master/linuxdeploy-plugin-gtk.sh"
    )
    assert_url_resolvable(linuxdeploy_gtk_plugin.download_url)