def test_string_scalar(add_response): name, value = 'telemetry.test.string_kind', 'string' scalar = Scalar(name, value) assert scalar.get_value() == value assert scalar.get_name() == name assert scalar.get_kind() == 'string'
def test_any_case(add_response): name, value = 'telemetry.test.UNSIGNED_int_kind', 8 Scalar(name, value) scalar_2 = Scalar(name, value) assert scalar_2.get_value() == value assert scalar_2.get_name() == name
def test_cache(add_response): name, value = 'telemetry.test.unsigned_int_kind', 8 Scalar(name, value) scalar_2 = Scalar(name, value) assert scalar_2.get_value() == value assert scalar_2.get_name() == name
def test_release_url(add_response): name, value = 'telemetry.test.unsigned_int_kind', 8 scalar = Scalar(name, value, scalars_url=release_file) assert scalar.get_value() == value assert scalar.get_name() == name
def test_int_addition(add_response): name, value = 'telemetry.test.unsigned_int_kind', 8 scalar = Scalar(name, value) + Scalar(name, value) assert scalar.get_value() == value * 2 assert scalar.get_name() == name assert Scalar.REQUIRED_FIELDS.issubset(scalar.get_definition().viewkeys())
def test_release_revision(add_response): name, value = 'telemetry.test.unsigned_int_kind', 8 scalar = Scalar(name, value, revision='https://hg.mozilla.org/releases/mozilla-release/rev/tip') assert scalar.get_value() == value assert scalar.get_name() == name
def test_boolean_scalar(add_response): name, value = 'telemetry.test.boolean_kind', True scalar = Scalar(name, value) assert scalar.get_value() == value assert scalar.get_name() == name assert scalar.get_kind() == 'boolean'
def test_release_channel(add_response): name, value = 'telemetry.test.unsigned_int_kind', 8 scalar = Scalar(name, value, channel='release') assert scalar.get_value() == value assert scalar.get_name() == name assert Scalar.REQUIRED_FIELDS.issubset(scalar.get_definition().viewkeys())
def test_int_scalar(add_response): name, value = 'telemetry.test.unsigned_int_kind', 8 scalar = Scalar(name, value) assert scalar.get_value() == value assert scalar.get_name() == name assert scalar.get_kind() == 'uint'
def test_release_revision(add_response): name, value = 'telemetry.test.unsigned_int_kind', 8 scalar = Scalar(name, value, revision='https://hg.mozilla.org/releases/mozilla-release/rev/tip') assert scalar.get_value() == value assert scalar.get_name() == name assert Scalar.REQUIRED_FIELDS.issubset(scalar.get_definition().viewkeys())
def test_boolean_scalar(add_response): name, value = 'telemetry.test.boolean_kind', True scalar = Scalar(name, value) assert scalar.get_value() == value assert scalar.get_name() == name assert scalar.get_definition().get('kind') == 'boolean' assert Scalar.REQUIRED_FIELDS.issubset(scalar.get_definition().viewkeys())
def test_string_scalar(add_response): name, value = 'telemetry.test.string_kind', 'string' scalar = Scalar(name, value) assert scalar.get_value() == value assert scalar.get_name() == name assert scalar.get_definition().get('kind') == 'string' assert Scalar.REQUIRED_FIELDS.issubset(scalar.get_definition().viewkeys())
def test_any_case(add_response): name, value = 'telemetry.test.UNSIGNED_int_kind', 8 Scalar(name, value) scalar_2 = Scalar(name, value) assert scalar_2.get_value() == value assert scalar_2.get_name() == name assert Scalar.REQUIRED_FIELDS.issubset( scalar_2.get_definition().viewkeys())
def test_release_revision(add_response): name, value = 'telemetry.test.unsigned_int_kind', 8 scalar = Scalar( name, value, revision='https://hg.mozilla.org/releases/mozilla-release/rev/tip') assert scalar.get_value() == value assert scalar.get_name() == name
def test_int_addition(add_response): name, value = 'telemetry.test.unsigned_int_kind', 8 scalar = Scalar(name, value) + Scalar(name, value) assert scalar.get_value() == value * 2 assert scalar.get_name() == name
def test_release_channel(add_response): name, value = 'telemetry.test.unsigned_int_kind', 8 scalar = Scalar(name, value, channel='release') assert scalar.get_value() == value assert scalar.get_name() == name