robotframework-mimesislibrary 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- MimesisLibrary/__init__.py +206 -0
- MimesisLibrary/keywords/__init__.py +37 -0
- MimesisLibrary/keywords/address.py +176 -0
- MimesisLibrary/keywords/code.py +84 -0
- MimesisLibrary/keywords/cryptographic.py +98 -0
- MimesisLibrary/keywords/datetime_kw.py +129 -0
- MimesisLibrary/keywords/development.py +80 -0
- MimesisLibrary/keywords/finance.py +126 -0
- MimesisLibrary/keywords/food.py +78 -0
- MimesisLibrary/keywords/hardware.py +130 -0
- MimesisLibrary/keywords/internet.py +175 -0
- MimesisLibrary/keywords/numeric.py +106 -0
- MimesisLibrary/keywords/path.py +70 -0
- MimesisLibrary/keywords/payment.py +98 -0
- MimesisLibrary/keywords/person.py +278 -0
- MimesisLibrary/keywords/science.py +91 -0
- MimesisLibrary/keywords/text.py +170 -0
- MimesisLibrary/keywords/transport.py +50 -0
- MimesisLibrary/utils.py +96 -0
- MimesisLibrary/version.py +2 -0
- robotframework_mimesislibrary-1.0.0.dist-info/METADATA +183 -0
- robotframework_mimesislibrary-1.0.0.dist-info/RECORD +24 -0
- robotframework_mimesislibrary-1.0.0.dist-info/WHEEL +4 -0
- robotframework_mimesislibrary-1.0.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"""Datetime provider keywords — wraps :class:`mimesis.Datetime`."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import datetime as dt
|
|
6
|
+
|
|
7
|
+
from mimesis import Datetime
|
|
8
|
+
|
|
9
|
+
from MimesisLibrary.utils import resolve_locale
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class DatetimeKeywords:
|
|
13
|
+
"""Keywords for generating date and time fake data.
|
|
14
|
+
|
|
15
|
+
:class:`mimesis.Datetime` is locale-dependent for month and day names.
|
|
16
|
+
Keywords that produce locale-specific output accept an optional ``locale``
|
|
17
|
+
parameter; purely numeric/structural keywords do not.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
def _get_datetime(self, locale: str | None) -> Datetime:
|
|
21
|
+
"""Return a Datetime provider, using per-call locale if given."""
|
|
22
|
+
if locale is not None:
|
|
23
|
+
return Datetime(locale=resolve_locale(locale), seed=self._seed)
|
|
24
|
+
return self._datetime # type: ignore[attr-defined]
|
|
25
|
+
|
|
26
|
+
def fake_date(self, start: int = 1970, end: int = 2025) -> str:
|
|
27
|
+
"""Return a randomly generated date as an ISO 8601 string.
|
|
28
|
+
|
|
29
|
+
:param start: Earliest year (default: 1970).
|
|
30
|
+
:param end: Latest year (default: 2025).
|
|
31
|
+
:returns: A date string in ``YYYY-MM-DD`` format.
|
|
32
|
+
|
|
33
|
+
Examples:
|
|
34
|
+
| ${date}= | Fake Date | |
|
|
35
|
+
| ${date}= | Fake Date | start=2000 | end=2024 |
|
|
36
|
+
"""
|
|
37
|
+
# Convert the date object to an ISO string for Robot Framework compatibility
|
|
38
|
+
return self._datetime.date(start=int(start), end=int(end)).isoformat() # type: ignore[attr-defined]
|
|
39
|
+
|
|
40
|
+
def fake_time(self) -> str:
|
|
41
|
+
"""Return a randomly generated time as an ISO 8601 string.
|
|
42
|
+
|
|
43
|
+
:returns: A time string in ``HH:MM:SS`` format.
|
|
44
|
+
|
|
45
|
+
Examples:
|
|
46
|
+
| ${time}= | Fake Time |
|
|
47
|
+
"""
|
|
48
|
+
return self._datetime.time().isoformat() # type: ignore[attr-defined]
|
|
49
|
+
|
|
50
|
+
def fake_datetime(self, start: int = 2000, end: int = 2025) -> str:
|
|
51
|
+
"""Return a randomly generated datetime as an ISO 8601 string.
|
|
52
|
+
|
|
53
|
+
:param start: Earliest year (default: 2000).
|
|
54
|
+
:param end: Latest year (default: 2025).
|
|
55
|
+
:returns: A datetime string in ``YYYY-MM-DDTHH:MM:SS`` format.
|
|
56
|
+
|
|
57
|
+
Examples:
|
|
58
|
+
| ${dt}= | Fake Datetime |
|
|
59
|
+
| ${dt}= | Fake Datetime | start=2020 | end=2024 |
|
|
60
|
+
"""
|
|
61
|
+
return self._datetime.datetime(start=int(start), end=int(end)).isoformat() # type: ignore[attr-defined]
|
|
62
|
+
|
|
63
|
+
def fake_timezone(self) -> str:
|
|
64
|
+
"""Return a randomly selected IANA timezone name.
|
|
65
|
+
|
|
66
|
+
:returns: A timezone string (e.g. ``"Europe/Istanbul"``).
|
|
67
|
+
|
|
68
|
+
Examples:
|
|
69
|
+
| ${tz}= | Fake Timezone |
|
|
70
|
+
"""
|
|
71
|
+
return self._datetime.timezone() # type: ignore[attr-defined]
|
|
72
|
+
|
|
73
|
+
def fake_month(self, locale: str | None = None) -> str:
|
|
74
|
+
"""Return a randomly selected month name.
|
|
75
|
+
|
|
76
|
+
:param locale: Optional locale code override (affects the language of the name).
|
|
77
|
+
:returns: A month name string.
|
|
78
|
+
|
|
79
|
+
Examples:
|
|
80
|
+
| ${month}= | Fake Month | |
|
|
81
|
+
| ${month}= | Fake Month | locale=TR |
|
|
82
|
+
"""
|
|
83
|
+
return self._get_datetime(locale).month()
|
|
84
|
+
|
|
85
|
+
def fake_day_of_week(self, locale: str | None = None) -> str:
|
|
86
|
+
"""Return a randomly selected day-of-week name.
|
|
87
|
+
|
|
88
|
+
:param locale: Optional locale code override.
|
|
89
|
+
:returns: A day name string.
|
|
90
|
+
|
|
91
|
+
Examples:
|
|
92
|
+
| ${day}= | Fake Day Of Week | |
|
|
93
|
+
| ${day}= | Fake Day Of Week | locale=DE |
|
|
94
|
+
"""
|
|
95
|
+
return self._get_datetime(locale).day_of_week()
|
|
96
|
+
|
|
97
|
+
def fake_year(self, minimum: int = 1990, maximum: int = 2025) -> int:
|
|
98
|
+
"""Return a randomly generated year as an integer.
|
|
99
|
+
|
|
100
|
+
:param minimum: Minimum year (default: 1990).
|
|
101
|
+
:param maximum: Maximum year (default: 2025).
|
|
102
|
+
:returns: An integer year.
|
|
103
|
+
|
|
104
|
+
Examples:
|
|
105
|
+
| ${year}= | Fake Year | |
|
|
106
|
+
| ${year}= | Fake Year | minimum=2000 |
|
|
107
|
+
"""
|
|
108
|
+
return self._datetime.year(minimum=int(minimum), maximum=int(maximum)) # type: ignore[attr-defined]
|
|
109
|
+
|
|
110
|
+
def fake_century(self) -> str:
|
|
111
|
+
"""Return a randomly selected century string (e.g. ``"XXI"``).
|
|
112
|
+
|
|
113
|
+
:returns: A Roman-numeral century string.
|
|
114
|
+
|
|
115
|
+
Examples:
|
|
116
|
+
| ${century}= | Fake Century |
|
|
117
|
+
"""
|
|
118
|
+
return self._datetime.century() # type: ignore[attr-defined]
|
|
119
|
+
|
|
120
|
+
def fake_periodicity(self, locale: str | None = None) -> str:
|
|
121
|
+
"""Return a randomly selected periodicity word (e.g. ``"daily"``, ``"weekly"``).
|
|
122
|
+
|
|
123
|
+
:param locale: Optional locale code override.
|
|
124
|
+
:returns: A periodicity string.
|
|
125
|
+
|
|
126
|
+
Examples:
|
|
127
|
+
| ${period}= | Fake Periodicity |
|
|
128
|
+
"""
|
|
129
|
+
return self._get_datetime(locale).periodicity()
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"""Development provider keywords — wraps :class:`mimesis.Development`."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class DevelopmentKeywords:
|
|
7
|
+
"""Keywords for generating software development fake data.
|
|
8
|
+
|
|
9
|
+
:class:`mimesis.Development` is locale-independent.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
def fake_programming_language(self) -> str:
|
|
13
|
+
"""Return a randomly selected programming language name.
|
|
14
|
+
|
|
15
|
+
:returns: A programming language string (e.g. ``"Python"``, ``"Go"``).
|
|
16
|
+
|
|
17
|
+
Examples:
|
|
18
|
+
| ${lang}= | Fake Programming Language |
|
|
19
|
+
"""
|
|
20
|
+
return self._development.programming_language() # type: ignore[attr-defined]
|
|
21
|
+
|
|
22
|
+
def fake_os(self) -> str:
|
|
23
|
+
"""Return a randomly selected operating system name.
|
|
24
|
+
|
|
25
|
+
:returns: An OS name string (e.g. ``"Linux"``, ``"macOS"``).
|
|
26
|
+
|
|
27
|
+
Examples:
|
|
28
|
+
| ${os}= | Fake OS |
|
|
29
|
+
"""
|
|
30
|
+
return self._development.os() # type: ignore[attr-defined]
|
|
31
|
+
|
|
32
|
+
def fake_software_license(self) -> str:
|
|
33
|
+
"""Return a randomly selected software license name.
|
|
34
|
+
|
|
35
|
+
:returns: A license name string (e.g. ``"MIT"``, ``"Apache 2.0"``).
|
|
36
|
+
|
|
37
|
+
Examples:
|
|
38
|
+
| ${license}= | Fake Software License |
|
|
39
|
+
"""
|
|
40
|
+
return self._development.software_license() # type: ignore[attr-defined]
|
|
41
|
+
|
|
42
|
+
def fake_system_quality_attribute(self) -> str:
|
|
43
|
+
"""Return a randomly selected software quality attribute.
|
|
44
|
+
|
|
45
|
+
:returns: A quality attribute string (e.g. ``"Scalability"``, ``"Security"``).
|
|
46
|
+
|
|
47
|
+
Examples:
|
|
48
|
+
| ${attr}= | Fake System Quality Attribute |
|
|
49
|
+
"""
|
|
50
|
+
return self._development.system_quality_attribute() # type: ignore[attr-defined]
|
|
51
|
+
|
|
52
|
+
def fake_boolean(self) -> bool:
|
|
53
|
+
"""Return a randomly generated boolean value.
|
|
54
|
+
|
|
55
|
+
:returns: ``True`` or ``False``.
|
|
56
|
+
|
|
57
|
+
Examples:
|
|
58
|
+
| ${flag}= | Fake Boolean |
|
|
59
|
+
"""
|
|
60
|
+
return self._development.boolean() # type: ignore[attr-defined]
|
|
61
|
+
|
|
62
|
+
def fake_version(self) -> str:
|
|
63
|
+
"""Return a randomly generated semantic version string.
|
|
64
|
+
|
|
65
|
+
:returns: A version string (e.g. ``"1.4.2"``).
|
|
66
|
+
|
|
67
|
+
Examples:
|
|
68
|
+
| ${ver}= | Fake Version |
|
|
69
|
+
"""
|
|
70
|
+
return self._development.version() # type: ignore[attr-defined]
|
|
71
|
+
|
|
72
|
+
def fake_calver(self) -> str:
|
|
73
|
+
"""Return a randomly generated calendar version string.
|
|
74
|
+
|
|
75
|
+
:returns: A calver string (e.g. ``"2024.08.01"``).
|
|
76
|
+
|
|
77
|
+
Examples:
|
|
78
|
+
| ${calver}= | Fake Calver |
|
|
79
|
+
"""
|
|
80
|
+
return self._development.calver() # type: ignore[attr-defined]
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"""Finance provider keywords — wraps :class:`mimesis.Finance`."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from mimesis import Finance
|
|
6
|
+
|
|
7
|
+
from MimesisLibrary.utils import resolve_locale
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class FinanceKeywords:
|
|
11
|
+
"""Keywords for generating finance-related fake data.
|
|
12
|
+
|
|
13
|
+
:class:`mimesis.Finance` is locale-dependent; keywords accept an optional
|
|
14
|
+
``locale`` parameter to override the library default.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
def _get_finance(self, locale: str | None) -> Finance:
|
|
18
|
+
"""Return a Finance provider, using per-call locale if given."""
|
|
19
|
+
if locale is not None:
|
|
20
|
+
return Finance(locale=resolve_locale(locale), seed=self._seed)
|
|
21
|
+
return self._finance # type: ignore[attr-defined]
|
|
22
|
+
|
|
23
|
+
def fake_bank_account(self, locale: str | None = None) -> str:
|
|
24
|
+
"""Return a randomly generated bank name.
|
|
25
|
+
|
|
26
|
+
:param locale: Optional locale code override.
|
|
27
|
+
:returns: A bank name string.
|
|
28
|
+
|
|
29
|
+
Examples:
|
|
30
|
+
| ${bank}= | Fake Bank Account | |
|
|
31
|
+
| ${bank}= | Fake Bank Account | locale=TR |
|
|
32
|
+
"""
|
|
33
|
+
# bank_account_number() was removed in mimesis 21.x; bank() returns the bank name
|
|
34
|
+
return self._get_finance(locale).bank()
|
|
35
|
+
|
|
36
|
+
def fake_currency_name(self, locale: str | None = None) -> str:
|
|
37
|
+
"""Return a randomly selected currency name.
|
|
38
|
+
|
|
39
|
+
:param locale: Optional locale code override.
|
|
40
|
+
:returns: A currency name string (e.g. ``"US Dollar"``).
|
|
41
|
+
|
|
42
|
+
Examples:
|
|
43
|
+
| ${currency}= | Fake Currency Name |
|
|
44
|
+
"""
|
|
45
|
+
return self._get_finance(locale).currency_name()
|
|
46
|
+
|
|
47
|
+
def fake_currency_code(self, locale: str | None = None) -> str:
|
|
48
|
+
"""Return a randomly selected ISO 4217 currency code.
|
|
49
|
+
|
|
50
|
+
:param locale: Optional locale code override.
|
|
51
|
+
:returns: A currency code string (e.g. ``"USD"``, ``"TRY"``).
|
|
52
|
+
|
|
53
|
+
Examples:
|
|
54
|
+
| ${code}= | Fake Currency Code |
|
|
55
|
+
"""
|
|
56
|
+
return self._get_finance(locale).currency_iso_code()
|
|
57
|
+
|
|
58
|
+
def fake_currency_symbol(self, locale: str | None = None) -> str:
|
|
59
|
+
"""Return a randomly selected currency symbol.
|
|
60
|
+
|
|
61
|
+
:param locale: Optional locale code override.
|
|
62
|
+
:returns: A currency symbol string (e.g. ``"$"``, ``"€"``).
|
|
63
|
+
|
|
64
|
+
Examples:
|
|
65
|
+
| ${symbol}= | Fake Currency Symbol |
|
|
66
|
+
"""
|
|
67
|
+
return self._get_finance(locale).currency_symbol()
|
|
68
|
+
|
|
69
|
+
def fake_stock_name(self, locale: str | None = None) -> str:
|
|
70
|
+
"""Return a randomly selected stock / company name.
|
|
71
|
+
|
|
72
|
+
:param locale: Optional locale code override.
|
|
73
|
+
:returns: A stock name string.
|
|
74
|
+
|
|
75
|
+
Examples:
|
|
76
|
+
| ${stock}= | Fake Stock Name |
|
|
77
|
+
"""
|
|
78
|
+
return self._get_finance(locale).stock_name()
|
|
79
|
+
|
|
80
|
+
def fake_stock_ticker(self, locale: str | None = None) -> str:
|
|
81
|
+
"""Return a randomly generated stock ticker symbol.
|
|
82
|
+
|
|
83
|
+
:param locale: Optional locale code override.
|
|
84
|
+
:returns: A ticker string (e.g. ``"AAPL"``).
|
|
85
|
+
|
|
86
|
+
Examples:
|
|
87
|
+
| ${ticker}= | Fake Stock Ticker |
|
|
88
|
+
"""
|
|
89
|
+
return self._get_finance(locale).stock_ticker()
|
|
90
|
+
|
|
91
|
+
def fake_cryptocurrency_symbol(self) -> str:
|
|
92
|
+
"""Return a randomly selected cryptocurrency symbol.
|
|
93
|
+
|
|
94
|
+
:returns: A crypto symbol string (e.g. ``"BTC"``, ``"ETH"``).
|
|
95
|
+
|
|
96
|
+
Examples:
|
|
97
|
+
| ${crypto}= | Fake Cryptocurrency Symbol |
|
|
98
|
+
"""
|
|
99
|
+
return self._finance.cryptocurrency_symbol() # type: ignore[attr-defined]
|
|
100
|
+
|
|
101
|
+
def fake_cryptocurrency_name(self) -> str:
|
|
102
|
+
"""Return a randomly selected cryptocurrency name.
|
|
103
|
+
|
|
104
|
+
:returns: A cryptocurrency name string (e.g. ``"Bitcoin"``).
|
|
105
|
+
|
|
106
|
+
Examples:
|
|
107
|
+
| ${crypto}= | Fake Cryptocurrency Name |
|
|
108
|
+
"""
|
|
109
|
+
return self._finance.cryptocurrency_name() # type: ignore[attr-defined]
|
|
110
|
+
|
|
111
|
+
def fake_price(
|
|
112
|
+
self,
|
|
113
|
+
minimum: float = 10.0,
|
|
114
|
+
maximum: float = 1000.0,
|
|
115
|
+
) -> str:
|
|
116
|
+
"""Return a randomly generated price string.
|
|
117
|
+
|
|
118
|
+
:param minimum: Minimum price value (default: 10.0).
|
|
119
|
+
:param maximum: Maximum price value (default: 1000.0).
|
|
120
|
+
:returns: A price string including currency symbol.
|
|
121
|
+
|
|
122
|
+
Examples:
|
|
123
|
+
| ${price}= | Fake Price | |
|
|
124
|
+
| ${price}= | Fake Price | maximum=500.0 |
|
|
125
|
+
"""
|
|
126
|
+
return self._finance.price(minimum=float(minimum), maximum=float(maximum)) # type: ignore[attr-defined]
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"""Food provider keywords — wraps :class:`mimesis.Food`."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from mimesis import Food
|
|
6
|
+
|
|
7
|
+
from MimesisLibrary.utils import resolve_locale
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class FoodKeywords:
|
|
11
|
+
"""Keywords for generating food-related fake data.
|
|
12
|
+
|
|
13
|
+
:class:`mimesis.Food` is locale-dependent; keywords accept an optional
|
|
14
|
+
``locale`` parameter.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
def _get_food(self, locale: str | None) -> Food:
|
|
18
|
+
"""Return a Food provider, using per-call locale if given."""
|
|
19
|
+
if locale is not None:
|
|
20
|
+
return Food(locale=resolve_locale(locale), seed=self._seed)
|
|
21
|
+
return self._food # type: ignore[attr-defined]
|
|
22
|
+
|
|
23
|
+
def fake_dish(self, locale: str | None = None) -> str:
|
|
24
|
+
"""Return a randomly selected dish name.
|
|
25
|
+
|
|
26
|
+
:param locale: Optional locale code override.
|
|
27
|
+
:returns: A dish name string.
|
|
28
|
+
|
|
29
|
+
Examples:
|
|
30
|
+
| ${dish}= | Fake Dish | |
|
|
31
|
+
| ${dish}= | Fake Dish | locale=TR |
|
|
32
|
+
"""
|
|
33
|
+
return self._get_food(locale).dish()
|
|
34
|
+
|
|
35
|
+
def fake_drink(self, locale: str | None = None) -> str:
|
|
36
|
+
"""Return a randomly selected drink name.
|
|
37
|
+
|
|
38
|
+
:param locale: Optional locale code override.
|
|
39
|
+
:returns: A drink name string.
|
|
40
|
+
|
|
41
|
+
Examples:
|
|
42
|
+
| ${drink}= | Fake Drink |
|
|
43
|
+
"""
|
|
44
|
+
return self._get_food(locale).drink()
|
|
45
|
+
|
|
46
|
+
def fake_fruit(self, locale: str | None = None) -> str:
|
|
47
|
+
"""Return a randomly selected fruit name.
|
|
48
|
+
|
|
49
|
+
:param locale: Optional locale code override.
|
|
50
|
+
:returns: A fruit name string.
|
|
51
|
+
|
|
52
|
+
Examples:
|
|
53
|
+
| ${fruit}= | Fake Fruit | |
|
|
54
|
+
| ${fruit}= | Fake Fruit | locale=TR |
|
|
55
|
+
"""
|
|
56
|
+
return self._get_food(locale).fruit()
|
|
57
|
+
|
|
58
|
+
def fake_vegetable(self, locale: str | None = None) -> str:
|
|
59
|
+
"""Return a randomly selected vegetable name.
|
|
60
|
+
|
|
61
|
+
:param locale: Optional locale code override.
|
|
62
|
+
:returns: A vegetable name string.
|
|
63
|
+
|
|
64
|
+
Examples:
|
|
65
|
+
| ${veg}= | Fake Vegetable |
|
|
66
|
+
"""
|
|
67
|
+
return self._get_food(locale).vegetable()
|
|
68
|
+
|
|
69
|
+
def fake_spice(self, locale: str | None = None) -> str:
|
|
70
|
+
"""Return a randomly selected spice name.
|
|
71
|
+
|
|
72
|
+
:param locale: Optional locale code override.
|
|
73
|
+
:returns: A spice name string.
|
|
74
|
+
|
|
75
|
+
Examples:
|
|
76
|
+
| ${spice}= | Fake Spice |
|
|
77
|
+
"""
|
|
78
|
+
return self._get_food(locale).spice()
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"""Hardware provider keywords — wraps :class:`mimesis.Hardware`."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class HardwareKeywords:
|
|
7
|
+
"""Keywords for generating computer hardware fake data.
|
|
8
|
+
|
|
9
|
+
:class:`mimesis.Hardware` is locale-independent.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
def fake_cpu(self) -> str:
|
|
13
|
+
"""Return a randomly selected CPU model name.
|
|
14
|
+
|
|
15
|
+
:returns: A CPU model string (e.g. ``"Intel Core i9"``).
|
|
16
|
+
|
|
17
|
+
Examples:
|
|
18
|
+
| ${cpu}= | Fake CPU |
|
|
19
|
+
"""
|
|
20
|
+
return self._hardware.cpu() # type: ignore[attr-defined]
|
|
21
|
+
|
|
22
|
+
def fake_cpu_frequency(self) -> str:
|
|
23
|
+
"""Return a randomly generated CPU frequency string.
|
|
24
|
+
|
|
25
|
+
:returns: A frequency string (e.g. ``"3.20GHz"``).
|
|
26
|
+
|
|
27
|
+
Examples:
|
|
28
|
+
| ${freq}= | Fake CPU Frequency |
|
|
29
|
+
"""
|
|
30
|
+
return self._hardware.cpu_frequency() # type: ignore[attr-defined]
|
|
31
|
+
|
|
32
|
+
def fake_cpu_codename(self) -> str:
|
|
33
|
+
"""Return a randomly selected CPU architecture codename.
|
|
34
|
+
|
|
35
|
+
:returns: A codename string (e.g. ``"Haswell"``).
|
|
36
|
+
|
|
37
|
+
Examples:
|
|
38
|
+
| ${codename}= | Fake CPU Codename |
|
|
39
|
+
"""
|
|
40
|
+
return self._hardware.cpu_codename() # type: ignore[attr-defined]
|
|
41
|
+
|
|
42
|
+
def fake_gpu(self) -> str:
|
|
43
|
+
"""Return a randomly selected GPU model name.
|
|
44
|
+
|
|
45
|
+
:returns: A GPU model string (e.g. ``"NVIDIA GeForce RTX 3080"``).
|
|
46
|
+
|
|
47
|
+
Examples:
|
|
48
|
+
| ${gpu}= | Fake GPU |
|
|
49
|
+
"""
|
|
50
|
+
return self._hardware.gpu() # type: ignore[attr-defined]
|
|
51
|
+
|
|
52
|
+
def fake_ram_size(self) -> str:
|
|
53
|
+
"""Return a randomly selected RAM capacity string.
|
|
54
|
+
|
|
55
|
+
:returns: A RAM size string (e.g. ``"16GB"``).
|
|
56
|
+
|
|
57
|
+
Examples:
|
|
58
|
+
| ${ram}= | Fake RAM Size |
|
|
59
|
+
"""
|
|
60
|
+
return self._hardware.ram_size() # type: ignore[attr-defined]
|
|
61
|
+
|
|
62
|
+
def fake_ram_type(self) -> str:
|
|
63
|
+
"""Return a randomly selected RAM type string.
|
|
64
|
+
|
|
65
|
+
:returns: A RAM type string (e.g. ``"DDR4"``).
|
|
66
|
+
|
|
67
|
+
Examples:
|
|
68
|
+
| ${type}= | Fake RAM Type |
|
|
69
|
+
"""
|
|
70
|
+
return self._hardware.ram_type() # type: ignore[attr-defined]
|
|
71
|
+
|
|
72
|
+
def fake_screen_size(self) -> str:
|
|
73
|
+
"""Return a randomly selected screen size string.
|
|
74
|
+
|
|
75
|
+
:returns: A screen size string (e.g. ``"15.6\""``).
|
|
76
|
+
|
|
77
|
+
Examples:
|
|
78
|
+
| ${size}= | Fake Screen Size |
|
|
79
|
+
"""
|
|
80
|
+
return self._hardware.screen_size() # type: ignore[attr-defined]
|
|
81
|
+
|
|
82
|
+
def fake_screen_resolution(self) -> str:
|
|
83
|
+
"""Return a randomly selected screen resolution string.
|
|
84
|
+
|
|
85
|
+
:returns: A resolution string (e.g. ``"1920x1080"``).
|
|
86
|
+
|
|
87
|
+
Examples:
|
|
88
|
+
| ${res}= | Fake Screen Resolution |
|
|
89
|
+
"""
|
|
90
|
+
return self._hardware.resolution() # type: ignore[attr-defined]
|
|
91
|
+
|
|
92
|
+
def fake_ssd_or_hdd(self) -> str:
|
|
93
|
+
"""Return a randomly selected storage type and capacity.
|
|
94
|
+
|
|
95
|
+
:returns: A storage string (e.g. ``"512GB SSD"``).
|
|
96
|
+
|
|
97
|
+
Examples:
|
|
98
|
+
| ${storage}= | Fake SSD Or HDD |
|
|
99
|
+
"""
|
|
100
|
+
return self._hardware.ssd_or_hdd() # type: ignore[attr-defined]
|
|
101
|
+
|
|
102
|
+
def fake_phone_model(self) -> str:
|
|
103
|
+
"""Return a randomly selected phone model name.
|
|
104
|
+
|
|
105
|
+
:returns: A phone model string (e.g. ``"iPhone 15 Pro"``).
|
|
106
|
+
|
|
107
|
+
Examples:
|
|
108
|
+
| ${phone}= | Fake Phone Model |
|
|
109
|
+
"""
|
|
110
|
+
return self._hardware.phone_model() # type: ignore[attr-defined]
|
|
111
|
+
|
|
112
|
+
def fake_graphics_processor(self) -> str:
|
|
113
|
+
"""Return a randomly selected graphics processor model.
|
|
114
|
+
|
|
115
|
+
:returns: A GPU model string.
|
|
116
|
+
|
|
117
|
+
Examples:
|
|
118
|
+
| ${gpu}= | Fake Graphics Processor |
|
|
119
|
+
"""
|
|
120
|
+
return self._hardware.graphics() # type: ignore[attr-defined]
|
|
121
|
+
|
|
122
|
+
def fake_manufacturer(self) -> str:
|
|
123
|
+
"""Return a randomly selected hardware manufacturer name.
|
|
124
|
+
|
|
125
|
+
:returns: A manufacturer string (e.g. ``"Apple"``, ``"Samsung"``).
|
|
126
|
+
|
|
127
|
+
Examples:
|
|
128
|
+
| ${mfr}= | Fake Manufacturer |
|
|
129
|
+
"""
|
|
130
|
+
return self._hardware.manufacturer() # type: ignore[attr-defined]
|