예제 #1
0
파일: testBuilds.py 프로젝트: AlinT/socorro
  def test_insertReleaseBuild(self):
    me.cur = me.conn.cursor(cursor_factory=psy.LoggingCursor)
    me.cur.setLogger(me.fileLogger)

    me.cur.execute("DELETE FROM releases_raw WHERE product_name = 'PRODUCTNAME5'")
    me.cur.connection.commit()

    try:
      builds.insertReleaseBuild(me.cur, 'PRODUCTNAME5', 'VERSIONAME5', '5', 'BUILDTYPE5', '5', 'PLATFORMNAME5')
      actual = builds.releaseBuildExists(me.cur, 'PRODUCTNAME5', 'VERSIONAME5', '5', 'BUILDTYPE5', 'PLATFORMNAME5', '5')
      assert actual == 1, "expected 1, got %s" % (actual)
    except Exception, x:
      print "Exception in do_insertBuild() ... Error: ",type(x),x
      socorro.lib.util.reportExceptionAndAbort(me.fileLogger)
예제 #2
0
파일: testBuilds.py 프로젝트: AlinT/socorro
  def do_releaseBuildExists(self, d, correct):
    me.cur = me.conn.cursor(cursor_factory=psy.LoggingCursor)
    me.cur.setLogger(me.fileLogger)

    actual = builds.releaseBuildExists(me.cur, d[0], d[1], d[2], d[3], d[4], d[5])
    assert actual == correct, "expected %s, got %s " % (correct, actual)