import pypuppetdb


def test_connect_api():
    puppetdb = pypuppetdb.connect()
    assert puppetdb.version == 'v4'

import pypuppetdb


def test_connect_api():
    puppetdb = pypuppetdb.connect()
    assert puppetdb.version == 'v4'


def test_connect_with_statement():
    with pypuppetdb.connect() as puppetdb:
        assert puppetdb.version == 'v4'

Add test for creating connection with 'with' statement.
Add test for creating connection with 'with' statement.

  import pypuppetdb
  
  
  def test_connect_api():
      puppetdb = pypuppetdb.connect()
      assert puppetdb.version == 'v4'
  
+ 
+ def test_connect_with_statement():
+     with pypuppetdb.connect() as puppetdb:
+         assert puppetdb.version == 'v4'
+ 
Add test for creating connection with 'with' statement.
## Code Before:
import pypuppetdb


def test_connect_api():
    puppetdb = pypuppetdb.connect()
    assert puppetdb.version == 'v4'

## Instruction:
Add test for creating connection with 'with' statement.
## Code After:
import pypuppetdb


def test_connect_api():
    puppetdb = pypuppetdb.connect()
    assert puppetdb.version == 'v4'


def test_connect_with_statement():
    with pypuppetdb.connect() as puppetdb:
        assert puppetdb.version == 'v4'
