-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.tests
More file actions
54 lines (39 loc) · 1.83 KB
/
README.tests
File metadata and controls
54 lines (39 loc) · 1.83 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Running the Tests
==================
WARNING: The tests will DELETE EVERYTHING in the Ipernity account used.
DO NOT use your regular Ipernity account for running the tests.
Since the tests need access to Ipernity, some preparation is necessary to run
them. You need a SEPARATE Ipernity account to run the tests, too. Testing
should be done in a virtual environment. To prepare, follow this procedure:
1. Install the test requisites:
(.venv) $ pip install -e .[test]
2. Create an Ipernity application on https://www.ipernity.com/apps/key
Choose the "Software" authentication method.
3. Create another Ipernity application on https://www.ipernity.com/apps/key
Choose the "Web" authentication method and add something beginning with
"http://127.0.0.1" (the tests will ignore the rest) as the callback URL.
4. Login to Ipernity with "Remember me" activated. Use your browser's developer
tools to get your ipernity cookies. You need the "s" and "ua" cookies.
5. Create a file tests/.test-config.yaml with the following contents:
auth:
desktop:
api_key: "<your first application key>"
api_secret: "<your first application secret>"
web:
api_key: "<your second application key>"
api_secret: "<your second application secret>"
user:
user_id: "<your user id on Ipernity>"
username: "<your display name on Ipernity>"
cookies:
www.ipernity.com:
/:
cookie_consent: ok
s: "<your s cookie>"
ua: "<your ua cookie>"
Optionally, you can add a key ``api_args`` containing additional arguments
for the API constructor.
If you cloned the repository on Github, you can pass these parameters to
the "test" workflow as secrets.
6. After that, you should be able to run the tests with
(.venv) $ pytest