title: Set Spark Config property for spark-testing-base
body: <p>While I was trying to use <a href="https://github.com/holdenk/spark-testing-base" rel="nofollow noreferrer">spark-testing-base</a> in Python, I needed to test a function which writes on a Postgres DB.</p>
  
  <p>To do so is necessary to provide to the Spark Session the Driver to connect to Posgtres; to achieve that I first tried to override the <code>getConf()</code> <a href="https://github.com/holdenk/spark-testing-base/blob/master/python/sparktestingbase/sqltestcase.py" rel="nofollow noreferrer">method</a> (as reported in the comment <code>Override this to specify any custom configuration.</code>). But apparently it doesn't work. Probably I'm not passing the value with the required syntax or whatever but after many attempts I anyway get the error <code>java.lang.ClassNotFoundException: org.postgresql.Driver</code> (typical of when the Driver Jar was not correctly downloaded through the conf parameter).</p>
  
  <p>Attempted <code>getConf</code> override:</p>
  
  <pre><code>    def getConf(self):
          return ("spark.jars.packages", "org.postgresql:postgresql:42.1.1")
  
      def getConf(self):
          return {"spark.jars.packages", "org.postgresql:postgresql:42.1.1"}
  
      def getConf(self):
          return SparkConf()\
              .setMaster("local[*]")\
              .setAppName("test")\
              .set("spark.jars.packages", "org.postgresql:postgresql:42.1.1")
  </code></pre>
  
  <p>So I even tried to Override <code>the setUp()</code> method like that:</p>
  
  <pre><code>    def setUp(self):
          try:
              from pyspark.sql import Session
              self.session = Session.Builder.config("spark.jars.packages", "org.postgresql:postgresql:42.1.1")
              self.sqlCtx = self.session._wrapped
          except Exception:
              self.sqlCtx = SQLContext(self.sc)
  </code></pre>
  
  <p>But still no luck. So what I am doing wrong? How am I supposed to override the <code>getConf()</code> method?</p>