Repository navigation
Expand file tree
/
Copy pathconftest.py
More file actions
79 lines (73 loc) · 2.4 KB
/
Copy pathconftest.py
File metadata and controls
79 lines (73 loc) · 2.4 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import datetime
from random import choice, randint
import pytest
from faker import Faker
Faker.seed()
@pytest.fixture(scope="function")
def resume_data():
# sample data of resume parser service
fake = Faker(locale="en")
_location = fake.location_on_land()
resume_parser_data = {
"basic": {
"first_name": fake.first_name(),
"last_name": fake.last_name(),
"email": fake.email(),
"phone_number": fake.phone_number(),
"location": f"{_location[2]}, {_location[3]}",
"portfolio_website_url": fake.uri(),
"linkedin_url": fake.uri(),
"github_url": fake.uri(),
"university": fake.company(),
"graduation_year": fake.date_object().strftime("%m/%Y"),
"majors": fake.text(max_nb_chars=50),
"birthday": fake.text(max_nb_chars=50),
},
"summary": fake.text(),
"project_experiences": [{"title": fake.text(), "description": fake.text()}],
"work_experiences": [
{
"title": fake.text(max_nb_chars=100),
"company": fake.company(),
"location": f"{_location[2]}, {_location[3]}",
"duration": {
"years": randint(0, 10),
"months": randint(0, 12),
},
"summary": fake.text(),
},
],
"educations": [
{
"school": fake.company(),
"degree": fake.text(max_nb_chars=20),
"field": fake.text(max_nb_chars=40),
"start": {
"year": randint(1990, datetime.date.today().year),
},
"end": {
"year": choice(
(
"present",
randint(1990, datetime.date.today().year),
)
),
},
},
],
"certifications": [
{
"title": fake.text(max_nb_chars=100),
"provider": fake.text(),
}
],
"languages": [
{"name": "English"},
],
"skills": [
{"name": "Python"},
],
"interests": [{"name": fake.text()} for _ in range(randint(1, 5))],
}
yield resume_parser_data
del resume_parser_data