def testBasic( self ):

      xVals = {
         'autoscalex_on' : True,
         'xmargin' : 0.5,
      }

      yVals = {
         'autoscaley_on' : True,
         'ymargin' : 0.5,
      }

      majTickVals = {
         'color' : '#F0F000',
         'markersize' : 15,
         'markeredgewidth' : 3.0,
         'linewidth' : 2,
         'visible' : True
      }

      minTickVals = {
         'color' : '#0F0F00',
         'markersize' : 5,
         'markeredgewidth' : 1.0,
         'linewidth' : 0.5,
         'visible' : True
      }

      majGridVals = {
         'color' : '#B0B0B0',
         'linestyle' : ':',
         'linewidth' : 1,
      }

      minGridVals = {
         'visible' : False,
      }

      fig = mpl.figure.Figure()
      ax = mpl.axes.Axes( fig, [ 0.2, 0.2, 0.6, 0.6 ] )
      ax.xaxis.set_major_locator( matplotlib.ticker.NullLocator() )
      ax.yaxis.set_major_locator( matplotlib.ticker.NullLocator() )

      #----------------------------------------------------------------------
      #MPL-HACK: There is a bug in matplotlib, where they forgot to add this
      #MPL-HACK: method to Axes.  We put this here to make the test work until
      #MPL-HACK: it is updated in matplotlib.
      #FUTURE: Fix this in matplotlib.

      def get_xmargin():
         return ax._xmargin

      ax.get_xmargin = get_xmargin

      def get_ymargin():
         return ax._ymargin

      ax.get_ymargin = get_ymargin
      #----------------------------------------------------------------------

      xStyle = MplAxisStyle(
         autoscale = xVals['autoscalex_on'],
         dataMargin = xVals['xmargin'],
         majorTicks = {
            'grid' : {
               'color' : majGridVals['color'],               
               'style' : majGridVals['linestyle'],
               'width' : majGridVals['linewidth'],
            },
            'length' : majTickVals['markersize'],
            'width' : majTickVals['markeredgewidth'],
            'marks' : {
               'color' : majTickVals['color'],               
               'width' : majTickVals['linewidth'],
               'visible' : majTickVals['visible'],
            },
         },
         minorTicks = {
            'grid' : {
               'visible' : minGridVals['visible'],               
            },
            'length' : minTickVals['markersize'],
            'width' : minTickVals['markeredgewidth'],
            'marks' : {
               'color' : minTickVals['color'],               
               'width' : minTickVals['linewidth'],
               'visible' : minTickVals['visible'],
            },
         },
      )

      yStyle = MplAxisStyle(
         autoscale = yVals['autoscaley_on'],
         dataMargin = yVals['ymargin'],
         majorTicks = {
            'grid' : {
               'color' : majGridVals['color'],               
               'style' : majGridVals['linestyle'],
               'width' : majGridVals['linewidth'],
            },
            'length' : majTickVals['markersize'],
            'width' : majTickVals['markeredgewidth'],
            'marks' : {
               'color' : majTickVals['color'],               
               'width' : majTickVals['linewidth'],
               'visible' : not majTickVals['visible'],
            },
         },
         minorTicks = {
            'grid' : {
               'visible' : minGridVals['visible'],               
            },
            'length' : minTickVals['markersize'],
            'width' : minTickVals['markeredgewidth'],
            'marks' : {
               'color' : minTickVals['color'],               
               'width' : minTickVals['linewidth'],
               'visible' : not minTickVals['visible'],
            },
         },
      )

      xStyle.apply( ax.get_xaxis() )
      yStyle.apply( ax.get_yaxis() )

      self.checkElement( "Apply xAxis", xVals, ax )
      self.checkElement( "Apply yAxis", yVals, ax )

      self.checkElement( "Apply x major ticks", majTickVals,
                          ax.get_xaxis().get_major_ticks()[0].tick1line )
      self.checkElement( "Apply x minor ticks", minTickVals,
                          ax.get_xaxis().get_minor_ticks()[0].tick1line )

      self.checkElement( "Apply x major grid", majGridVals,
                          ax.get_xaxis().get_major_ticks()[0].gridline )
      self.checkElement( "Apply x minor grid", minGridVals,
                          ax.get_xaxis().get_minor_ticks()[0].gridline )


      xStyle.majorTicks.marks.visible = False
      xStyle.minorTicks.marks.visible = False
      xStyle.apply( ax.get_xaxis() )

      self.assertEqual( [], ax.get_xaxis().get_major_ticks(),
               msg = "Failed to disable major ticks" )
      self.assertEqual( [], ax.get_xaxis().get_minor_ticks(),
               msg = "Failed to disable minor ticks" )

      majTickVals[ 'visible' ] = not majTickVals[ 'visible' ]
      minTickVals[ 'visible' ] = not minTickVals[ 'visible' ]
      # Since these are disabled (in the interest of coverage),
      # there is nothing to check.
      #self.checkElement( "Apply y major ticks", majTickVals,
      #                    ax.get_yaxis().get_major_ticks()[0].tick1line )
      #self.checkElement( "Apply y minor ticks", minTickVals,
      #                    ax.get_yaxis().get_minor_ticks()[0].tick1line )

      #self.checkElement( "Apply y major grid", majGridVals,
      #                    ax.get_yaxis().get_major_ticks()[0].gridline )
      #self.checkElement( "Apply y minor grid", minGridVals,
      #                    ax.get_yaxis().get_minor_ticks()[0].gridline )

      self.assertRaises( Exception, xStyle.apply, 'invalid',
                   msg = "Failed to throw on invalid element." )

   #-----------------------------------------------------------------------
:param transactions:        The transactions required to rebuild the case
dataset/ETHPy150Open nasa/mplStyle/mplStyle/test/test_MplAxisStyle.py/TestMplAxisStyle.testBasic--crossover with--dataset/ETHPy150Open dimagi/commcare-hq/corehq/form_processor/backends/sql/update_strategy.py/SqlCaseUpdateStrategy.rebuild_from_transactions