tgdata 0.1.2__tar.gz → 0.1.3__tar.gz
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.
- {tgdata-0.1.2 → tgdata-0.1.3}/PKG-INFO +1 -1
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/__init__.py +1 -1
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/_terminal_input.py +2 -1
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/_terminal_login_modes.py +21 -10
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_42_album_assembly.py +1 -1
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_43_photo_trails.py +1 -1
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_45_group_profile.py +1 -1
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_46_group_activity.py +1 -1
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_48_terminal_login.py +1 -1
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata.egg-info/PKG-INFO +1 -1
- {tgdata-0.1.2 → tgdata-0.1.3}/README.md +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/setup.cfg +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/setup.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/account_operation.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/account_pool.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/album.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/backfill.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/backfill_engine.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/backfill_state.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/batch_engine.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/batch_files.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/batch_heartbeat.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/budget_client.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/connection_engine.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/discovery_engine.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/group_activity.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/group_operations.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/group_profile.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/health.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/history_window.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/join_budget.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/join_client.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/login.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/login_cli.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/login_file.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/message_batch.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/message_engine.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/models.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/owned_health.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/photo_trails.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/pool_lifecycle.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/pool_observation.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/pool_result.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/pool_source.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/pool_state.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/progress.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/progress_facade.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/read_budget.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/session_store.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/__init__.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/_terminal_login_framing.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/_terminal_login_handoffs.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/_terminal_login_observer.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/my_test.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/pool_storage_cases.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_00_connection.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_01_list_group_chats.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_02_get_message_count.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_03_get_all_messages.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_04_get_all_messages_in_batches.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_05_with_progress_feature.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_06_polling_simple.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_07_on_new_message_simple.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_07_real_time_event_handler.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_08_batch_callback.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_08_polling.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_10_advanced_features.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_11_discover_groups.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_12_proxy.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_13_device_identity.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_14_flood_threshold.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_15_login_checks.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_16_health_events.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_17_session_store.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_18_read_budget.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_19_message_batches.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_22_daily_continuation.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_23_fixed_windows.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_24_backfill_state.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_25_backfill_delivery.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_26_backfill_completion.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_27_backfill_pacing.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_28_backfill_controls.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_29_backfill_public.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_30_backfill_integration.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_31_account_pool.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_32_account_operation.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_33_owned_health.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_34_group_access.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_35_join_budget.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_36_group_join.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_37_worker.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_38_worker_process.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_39_pool_lifecycle.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_40_pool_outcomes.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_41_stepwise_login.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_44_batch_heartbeat.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_debug_min_id.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_polling_debug.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/smoke_tests/test_username_support.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/sync_engine.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/sync_store.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/tgdata.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/utils.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/worker.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/worker_engine.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata/worker_protocol.py +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata.egg-info/SOURCES.txt +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata.egg-info/dependency_links.txt +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata.egg-info/entry_points.txt +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata.egg-info/requires.txt +0 -0
- {tgdata-0.1.2 → tgdata-0.1.3}/tgdata.egg-info/top_level.txt +0 -0
|
@@ -34,9 +34,10 @@ def _control(value):
|
|
|
34
34
|
def _validate(fd, attrs):
|
|
35
35
|
if os.tcgetpgrp(fd) != os.getpgrp():
|
|
36
36
|
raise TerminalInputError('terminal_not_foreground')
|
|
37
|
+
# The kernel may report pending input; the owned flush settles it while hidden.
|
|
37
38
|
allowed = 0
|
|
38
39
|
for name in ('ECHO', 'ECHOE', 'ECHOK', 'ECHONL', 'ECHOCTL', 'ECHOKE',
|
|
39
|
-
'ECHOPRT', 'ISIG', 'ICANON', 'IEXTEN', 'NOFLSH', 'TOSTOP'):
|
|
40
|
+
'ECHOPRT', 'ISIG', 'ICANON', 'IEXTEN', 'NOFLSH', 'TOSTOP', 'PENDIN'):
|
|
40
41
|
allowed |= getattr(termios, name, 0)
|
|
41
42
|
forbidden = (termios.ISTRIP | termios.IGNCR | termios.INLCR
|
|
42
43
|
| termios.PARMRK | getattr(termios, 'IUCLC', 0))
|
|
@@ -18,12 +18,18 @@ MODES=FIRST+['after_restore_normal','after_restore_eof']+['stop_'+p for p in ('a
|
|
|
18
18
|
'unicode','editing','limit128','limit129','kernel_overflow','invalid_utf8','partial_eof','typeahead',
|
|
19
19
|
'two_terminals','no_controlling','background','noncanonical','istrip','istrip_afterphone','bad_cr','small_canon','no_termios','echo_off']
|
|
20
20
|
BASE_MODES=tuple(MODES)
|
|
21
|
-
PROFILE_MODES=('no_isig','inlcr','parmrk','no_icrnl','
|
|
21
|
+
PROFILE_MODES=('no_isig','inlcr','parmrk','no_icrnl','flusho','unknown_lflag','bad_intr','disabled_eof','overlap_controls','newline_control','bad_vdisable','short_cc','thread','running_loop')
|
|
22
22
|
CONTROL_MODES=('quit_intermediate','suspend_intermediate','intr_intermediate','keyboard_cancel','keyboard_discard')
|
|
23
|
-
|
|
23
|
+
PENDIN_MODES=('pendin','pendin_password','pendin_first_phone_normal','pendin_first_phone_eof',
|
|
24
|
+
'pendin_first_code_eof','pendin_first_password_normal','pendin_first_replace_normal',
|
|
25
|
+
'pendin_first_retry_eof','pendin_keyboard_discard','pendin_kernel_overflow','pendin_unknown_lflag')
|
|
26
|
+
MODES+=list(PROFILE_MODES)+list(CONTROL_MODES)+list(PENDIN_MODES)
|
|
24
27
|
|
|
25
28
|
|
|
26
29
|
def child(mode):
|
|
30
|
+
case=mode
|
|
31
|
+
pendin_context=mode=='pendin' or mode.startswith('pendin_')
|
|
32
|
+
if mode.startswith('pendin_'):mode=mode[len('pendin_'):]
|
|
27
33
|
if mode=='background':
|
|
28
34
|
pid=os.fork()
|
|
29
35
|
if pid:
|
|
@@ -44,7 +50,7 @@ def child(mode):
|
|
|
44
50
|
if mode=='inlcr':attrs[0]|=termios.INLCR
|
|
45
51
|
if mode=='parmrk':attrs[0]|=termios.PARMRK
|
|
46
52
|
if mode=='no_icrnl':attrs[0]&=~termios.ICRNL
|
|
47
|
-
if
|
|
53
|
+
if pendin_context:attrs[3]|=termios.PENDIN
|
|
48
54
|
if mode=='flusho':attrs[3]|=termios.FLUSHO
|
|
49
55
|
if mode=='bad_intr':attrs[6][termios.VINTR]=b'\x18'
|
|
50
56
|
if mode=='disabled_eof':attrs[6][termios.VEOF]=b'\xff'
|
|
@@ -52,8 +58,9 @@ def child(mode):
|
|
|
52
58
|
if mode=='newline_control':attrs[6][termios.VEOF]=b'\n'
|
|
53
59
|
if attrs is not None and mode!='background':termios.tcsetattr(control,termios.TCSANOW,attrs)
|
|
54
60
|
before_control=termios.tcgetattr(control) if control is not None else None
|
|
61
|
+
if pendin_context:assert before_control[3]&termios.PENDIN
|
|
55
62
|
before_stdin=termios.tcgetattr(0)
|
|
56
|
-
phase=mode.split('_')[1] if mode.startswith('first_') else 'phone'
|
|
63
|
+
phase=mode.split('_')[1] if mode.startswith('first_') else 'password' if mode=='password' else 'phone'
|
|
57
64
|
two_factor=phase=='password'
|
|
58
65
|
existing=phase in ('replace','retry')
|
|
59
66
|
state=dict(selected=False, fd=None, fired=False, restored=False, reads=0, value=False, two_observed=False, candidate_mode_writes=0, hidden=False, intermediate=False, key_signals=0, quit_signals=0, suspend_signals=0)
|
|
@@ -218,7 +225,7 @@ def child(mode):
|
|
|
218
225
|
if mode=='two_terminals':assert state['two_observed'] and get(0)==before_stdin
|
|
219
226
|
assert signal.getsignal(signal.SIGINT)==original_handler
|
|
220
227
|
assert all(not w.up for w in service.wires)
|
|
221
|
-
saved=mode in ('typeahead','two_terminals','echo_off','small_canon')
|
|
228
|
+
saved=mode in ('typeahead','two_terminals','echo_off','small_canon','pendin','password')
|
|
222
229
|
expected_code=0 if saved else 2 if mode in ('no_controlling','background','noncanonical','istrip','bad_cr','no_termios')+PROFILE_MODES else 3 if (mode.startswith('fault_') and mode!='fault_restore_stop') or mode in ('limit129','kernel_overflow','invalid_utf8','istrip_afterphone') else 130
|
|
223
230
|
assert code==expected_code,(mode,code,expected_code)
|
|
224
231
|
if mode in PROFILE_MODES or mode in ('background','no_controlling','noncanonical','istrip','bad_cr','no_termios','stop_acquire','stop_snapshot'):
|
|
@@ -230,12 +237,14 @@ def child(mode):
|
|
|
230
237
|
expected_codes=1 if phase!='phone' or saved or mode=='istrip_afterphone' else 0
|
|
231
238
|
assert service.calls.count('SendCodeRequest')==expected_codes,(mode,service.calls)
|
|
232
239
|
if phase=='code' or mode=='istrip_afterphone':assert 'SignInRequest' not in service.calls
|
|
233
|
-
if phase=='password':assert 'CheckPasswordRequest' not in service.calls
|
|
240
|
+
if phase=='password' and not saved:assert 'CheckPasswordRequest' not in service.calls
|
|
241
|
+
if mode=='password':assert service.srp_accepted==1
|
|
234
242
|
if mode in ('unicode','editing','limit128'):assert state['value']
|
|
235
243
|
if mode.startswith(('first_','after_restore_','stop_','fault_')):assert state['fired'],mode
|
|
236
|
-
result=dict(mode=
|
|
244
|
+
result=dict(mode=case,exit=code,terminal_restored=restoration_observed,codes=expected_codes,saved=saved,
|
|
237
245
|
signal_or_fault_fired=state['fired'],value_checked=state['value'],two_terminals_observed=state['two_observed'])
|
|
238
246
|
result['candidate_mode_writes']=state['candidate_mode_writes']
|
|
247
|
+
result['initial_pendin']=bool(before_control is not None and before_control[3]&termios.PENDIN)
|
|
239
248
|
result['key_signals']=state['key_signals']
|
|
240
249
|
if mode=='flusho':put(control,termios.TCSANOW,original_control)
|
|
241
250
|
print('\nMATRIX_RESULT '+json.dumps(result),flush=True)
|
|
@@ -248,6 +257,8 @@ def child(mode):
|
|
|
248
257
|
|
|
249
258
|
|
|
250
259
|
def parent(mode):
|
|
260
|
+
case=mode
|
|
261
|
+
if mode.startswith('pendin_'):mode=mode[len('pendin_'):]
|
|
251
262
|
master,slave=pty.openpty(); extra=[]
|
|
252
263
|
stdin_slave=slave
|
|
253
264
|
if mode=='two_terminals':
|
|
@@ -255,14 +266,14 @@ def parent(mode):
|
|
|
255
266
|
def control():
|
|
256
267
|
os.setsid()
|
|
257
268
|
if mode!='no_controlling':fcntl.ioctl(slave,termios.TIOCSCTTY,0)
|
|
258
|
-
process=subprocess.Popen([sys.executable,str(Path(__file__).resolve()),'--child',
|
|
269
|
+
process=subprocess.Popen([sys.executable,str(Path(__file__).resolve()),'--child',case],
|
|
259
270
|
stdin=stdin_slave,stdout=slave,stderr=slave,preexec_fn=control,pass_fds=(slave,),
|
|
260
271
|
env=dict(os.environ,PYTHONDONTWRITEBYTECODE='1'))
|
|
261
272
|
os.close(slave)
|
|
262
273
|
if mode=='two_terminals':os.close(stdin_slave);extra.remove(stdin_slave)
|
|
263
274
|
os.set_blocking(master,False)
|
|
264
275
|
data=bytearray();seen={};deadline=time.monotonic()+15;pending=b'';written=0;requested=0;stage_sent=False;cancel_sent=False
|
|
265
|
-
target_phase=mode.split('_')[1] if mode.startswith('first_') else 'phone'
|
|
276
|
+
target_phase=mode.split('_')[1] if mode.startswith('first_') else 'password' if mode=='password' else 'phone'
|
|
266
277
|
try:
|
|
267
278
|
while time.monotonic()<deadline:
|
|
268
279
|
reads,writes,_=select.select([master],[master] if pending else [],[],0.005)
|
|
@@ -325,7 +336,7 @@ def run():
|
|
|
325
336
|
results=[]
|
|
326
337
|
for mode in MODES:
|
|
327
338
|
row=parent(mode);results.append(row)
|
|
328
|
-
print(('OWNED_TERMINAL ' if mode in BASE_MODES else 'PROFILE_CONTROL ')+json.dumps(row),flush=True)
|
|
339
|
+
print(('OWNED_TERMINAL ' if mode in BASE_MODES else 'PENDIN_CONTEXT ' if mode in PENDIN_MODES else 'PROFILE_CONTROL ')+json.dumps(row),flush=True)
|
|
329
340
|
return results
|
|
330
341
|
|
|
331
342
|
if __name__=='__main__':
|
|
@@ -124,7 +124,7 @@ class AlbumTests(unittest.TestCase):
|
|
|
124
124
|
for name in ('TelegramPost', 'AlbumAssemblyError', 'album_post_ids', 'assemble_albums'):
|
|
125
125
|
self.assertIs(getattr(tgdata, name), globals()[name])
|
|
126
126
|
self.assertIn(name, tgdata.__all__)
|
|
127
|
-
self.assertEqual(tgdata.__version__, '0.1.
|
|
127
|
+
self.assertEqual(tgdata.__version__, '0.1.3')
|
|
128
128
|
|
|
129
129
|
def test_sdk_large_ids_captions_and_cross_chat(self):
|
|
130
130
|
rows = (record(1, 'first'), record(2, 'second'))
|
|
@@ -123,7 +123,7 @@ class PhotoTrailTests(unittest.TestCase):
|
|
|
123
123
|
self.assertEqual(member_groups(result), ((1,), (2,)))
|
|
124
124
|
self.assertFalse(result.policy.enabled)
|
|
125
125
|
self.assertEqual((result.folded_posts,result.folded_photos),(0,0))
|
|
126
|
-
self.assertEqual(tgdata.__version__, '0.1.
|
|
126
|
+
self.assertEqual(tgdata.__version__, '0.1.3')
|
|
127
127
|
|
|
128
128
|
def test_policy_validation_and_immutable_roundtrip(self):
|
|
129
129
|
self.assertEqual(PhotoTrailPolicy.from_dict(ON.to_dict()), ON)
|
|
@@ -78,7 +78,7 @@ async def test_defaults_and_full_metadata():
|
|
|
78
78
|
async def test_public_exports_and_detached_immutable_values():
|
|
79
79
|
import tgdata
|
|
80
80
|
assert {'GroupProfile', 'GroupPinnedMessage'} <= set(tgdata.__all__)
|
|
81
|
-
assert tgdata.__version__ == '0.1.
|
|
81
|
+
assert tgdata.__version__ == '0.1.3'
|
|
82
82
|
assert len(tgdata.__all__) == len(set(tgdata.__all__))
|
|
83
83
|
tg, _ = setup(pin_response=pins([message()]))
|
|
84
84
|
value = await profile(tg, 3)
|
|
@@ -76,7 +76,7 @@ async def test_exports_frozen_values_and_json():
|
|
|
76
76
|
assert isinstance(value, GroupActivity) and isinstance(value.messages[0], ActivityMessage)
|
|
77
77
|
assert value.schema_version == 1 and value.account_id == 222
|
|
78
78
|
assert {'GroupActivity', 'ActivityMessage'} <= set(tgdata.__all__)
|
|
79
|
-
assert tgdata.__version__ == '0.1.
|
|
79
|
+
assert tgdata.__version__ == '0.1.3' and len(set(tgdata.__all__)) == len(tgdata.__all__)
|
|
80
80
|
for obj, key in ((value, 'coverage_complete'), (value.messages[0], 'views'), (value.group, 'title')):
|
|
81
81
|
fx.refuses(FrozenInstanceError, lambda: setattr(obj, key, 42))
|
|
82
82
|
data = value.to_dict()
|
|
@@ -945,7 +945,7 @@ def _native_matrix(module, prefixes, expected):
|
|
|
945
945
|
|
|
946
946
|
|
|
947
947
|
def test_native_terminal_profiles_and_controls():
|
|
948
|
-
_native_matrix('_terminal_login_modes', ('OWNED_TERMINAL ', 'PROFILE_CONTROL '),
|
|
948
|
+
_native_matrix('_terminal_login_modes', ('OWNED_TERMINAL ', 'PROFILE_CONTROL ', 'PENDIN_CONTEXT '), 80)
|
|
949
949
|
|
|
950
950
|
|
|
951
951
|
def test_native_input_framing():
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|