Exemplo n.º 1
0
 def testLogProperty(self):
     """Tests ``log`` property."""
     ids = {'id': '123'}
     log = Log.Create(ids)
     log.Log('DummyInfo', 'This is a dummy info.', 'info')
     analysis = CrashAnalysis.Create(ids)
     analysis.identifiers = ids
     self.assertEqual(log, analysis.log)
Exemplo n.º 2
0
    def testStackTraceWriteBigStackTraceToStorage(self):
        """Tests ``stack_trace`` setter writes big stacktrace to cloud storage."""
        identifiers = {'signature': 'sig'}
        analysis = CrashAnalysis.Create(identifiers)
        big_stacktrace = 'a' * 2048487
        analysis.stack_trace = big_stacktrace
        analysis.put()

        self.assertEqual(
            CrashAnalysis.Get(identifiers).stack_trace, big_stacktrace)
Exemplo n.º 3
0
 def CreateAnalysis(self, crash_identifiers):
     return CrashAnalysis.Create(crash_identifiers)
Exemplo n.º 4
0
 def testCreateCrashAnalysis(self):
     crash_identifiers = {'signature': 'sig'}
     analysis = CrashAnalysis.Create(crash_identifiers)
     analysis.put()
     self.assertIsNotNone(analysis)
     self.assertEqual(CrashAnalysis.Get(crash_identifiers), analysis)