Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
idomic committed Apr 26, 2022
1 parent 40a6e2b commit e859a93
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/cli/test_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,16 @@ def test_email_conf_file(tmp_directory, monkeypatch):
monkeypatch.setattr(cloud, '_email_registry', registry_mock)
monkeypatch.setattr(telemetry, 'DEFAULT_HOME_DIR', '.')

stats = Path('stats')
stats.mkdir()
conf_path = stats / telemetry.DEFAULT_USER_CONF
conf_path.write_text("sample_conf_key: True\n")

sample_email = 'test@example.com'
cloud._email_validation(sample_email)

settings = telemetry.UserSettings()
assert sample_email == settings.user_email
conf = conf_path.read_text()
assert sample_email in conf


def test_email_write_only_once(tmp_directory, monkeypatch):
Expand Down

0 comments on commit e859a93

Please sign in to comment.