grr/server/grr_response_server/db_stats_test.py
def testDuplicateStatsEntryWrite_SingleDimensional(self):
    """Tests errors raised when writing duplicate single-dimensional entries."""
    self._SetUpStatsTest()
    duplicate_entry = stats_values.StatsStoreEntry()
    duplicate_entry.FromDict(_single_dim_entry1.ToPrimitiveDict())
    duplicate_entry.metric_value.int_value = 43
    with self.assertRaises(db.DuplicateMetricValueError):
      self.db.WriteStatsStoreEntries([duplicate_entry])
Tests errors raised when writing duplicate single-dimensional entries.
Tests errors raised when writing duplicate single-dimensional entries.
Tests errors raised when writing duplicate single - dimensional entries .
def testDuplicateStatsEntryWrite_SingleDimensional(self):
    self._SetUpStatsTest()
    duplicate_entry = stats_values.StatsStoreEntry()
    duplicate_entry.FromDict(_single_dim_entry1.ToPrimitiveDict())
    duplicate_entry.metric_value.int_value = 43
    with self.assertRaises(db.DuplicateMetricValueError):
      self.db.WriteStatsStoreEntries([duplicate_entry])
def testDuplicateStatsEntryWrite_SingleDimensional ( self ) : self . _SetUpStatsTest ( ) duplicate_entry = stats_values . StatsStoreEntry ( ) duplicate_entry . FromDict ( _single_dim_entry1 . ToPrimitiveDict ( ) ) duplicate_entry . metric_value . int_value = 43 with self . assertRaises ( db . DuplicateMetricValueError ) : self . db . WriteStatsStoreEntries ( [ duplicate_entry ] )
Tests errors raised when writing duplicate single-dimensional entries.
Tests errors raised when writing duplicate single - dimensional entries .
"""Tests errors raised when writing duplicate single-dimensional entries."""
self