def test_key(self): assert RateByServiceSampler._default_key == RateByServiceSampler._key() assert "service:mcnulty,env:" == RateByServiceSampler._key( service="mcnulty") assert "service:,env:test" == RateByServiceSampler._key(env="test") assert "service:mcnulty,env:test" == RateByServiceSampler._key( service="mcnulty", env="test") assert "service:mcnulty,env:test" == RateByServiceSampler._key( "mcnulty", "test")
def test_key(self): assert RateByServiceSampler._default_key == RateByServiceSampler._key() assert 'service:mcnulty,env:' == RateByServiceSampler._key( service='mcnulty') assert 'service:,env:test' == RateByServiceSampler._key(env='test') assert 'service:mcnulty,env:test' == RateByServiceSampler._key( service='mcnulty', env='test') assert 'service:mcnulty,env:test' == RateByServiceSampler._key( 'mcnulty', 'test')