Пример #1
0
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'
Пример #2
0
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
Пример #3
0
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
Пример #4
0
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
Пример #5
0
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
Пример #6
0
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())
Пример #7
0
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
Пример #8
0
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'
Пример #9
0
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())
Пример #10
0
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'
Пример #11
0
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'
Пример #12
0
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
Пример #13
0
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'
Пример #14
0
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'
Пример #15
0
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())
Пример #16
0
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())
Пример #17
0
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())
Пример #19
0
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
Пример #20
0
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
Пример #21
0
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
Пример #22
0
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
Пример #23
0
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
Пример #24
0
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