Skip to content

Commit

Permalink
Reset telemetry sent
Browse files Browse the repository at this point in the history
  • Loading branch information
amritghimire committed Sep 13, 2024
1 parent 606e164 commit c564916
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_telemetry.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
from datachain import telemetry
from datachain.lib.dc import DataChain
from datachain.telemetry import is_enabled


def test_is_enabled():
assert not is_enabled()
assert not telemetry.is_enabled()


def test_telemetry_api_call(mocker, tmp_dir):
patch_send = mocker.patch("iterative_telemetry.IterativeTelemetryLogger.send")
telemetry._telemetry_sent = False

DataChain.from_storage(tmp_dir.as_uri())
assert patch_send.call_count == 1
Expand Down

0 comments on commit c564916

Please sign in to comment.