~aleteoryx/muditaos

ref: 6a7d0a4ee2a095411b8bf106a7d07a9bae283093 muditaos/test/pytest/service-desktop/test_send_file.py -rw-r--r-- 847 bytes
6a7d0a4e — Bartosz Cichocki [EGD-8059] Add verbosity to GH checks 4 years ago
                                                                                
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
# Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
# For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
import pytest
import filecmp


from harness.api.filesystem import get_file, put_file

fileName = "lorem-ipsum.txt"


@pytest.mark.service_desktop_test
@pytest.mark.usefixtures("phone_unlocked")
@pytest.mark.rt1051
def test_send_file(harness):
    """
    Attempt requesting and sending file to Pure
    """
    put_file(harness, fileName, "/sys/user/")


@pytest.mark.service_desktop_test
@pytest.mark.usefixtures("phone_unlocked")
@pytest.mark.rt1051
def test_get_file_back(harness):
    """
    Attempt requesting and transfering file data
    """
    loadedFile = "./lorem-ipsum-2.txt"

    get_file(harness, fileName, "./", "/sys/user/", loadedFile)

    assert filecmp.cmp(fileName, loadedFile, shallow=True)