Skip to content

Commit

Permalink
Merge pull request #46 from ZuluPro/py_turret_docs
Browse files Browse the repository at this point in the history
Update Python turrets docs
  • Loading branch information
karec authored Jan 12, 2017
2 parents b17c414 + faa1fdd commit 4783b16
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ target/

# doc
doc/html
*.sw[pon]
4 changes: 2 additions & 2 deletions doc/first_project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ By default, the ``oct new-project`` command will create an exemple test script u
class Transaction(BaseTransaction):
def __init__(self, config):
super(Transaction, self).__init__(config)
def __init__(self, config, context=None):
super(Transaction, self).__init__(config, context)
def setup(self):
"""Setup data or objects here
Expand Down
12 changes: 6 additions & 6 deletions doc/writing_tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Let's take the default ``v_user.py`` file :
class Transaction(BaseTransaction):
def __init__(self, config):
super(Transaction, self).__init__(config)
def __init__(self, config, context=None):
super(Transaction, self).__init__(config, context)
def setup(self):
"""Setup data or objects here
Expand Down Expand Up @@ -60,8 +60,8 @@ So first let's adapt the script to our needs:
class Transaction(BaseTransaction):
def __init__(self, config):
super(Transaction, self).__init__(config)
def __init__(self, config, context=None):
super(Transaction, self).__init__(config, context)
# each cannon will only instanciate Transaction once, so each property
# in the Transaction __init__ method will be set only once so take care if you need to update it
self.url = "http://my-api/1.0/"
Expand Down Expand Up @@ -123,8 +123,8 @@ How does it works ? Take a look a this example:
class Transaction(BaseTransaction):
def __init__(self, config):
super(Transaction, self).__init__(config)
def __init__(self, config, context=None):
super(Transaction, self).__init__(config, context)
# each cannon will only instanciate Transaction once, so each property
# in the Transaction __init__ method will be set only once so take care if you need to update it
self.url = "http://my-api/1.0/"
Expand Down
4 changes: 2 additions & 2 deletions oct/utilities/templates/scripts/v_user.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import time


class Transaction(BaseTransaction):
def __init__(self, config):
super(Transaction, self).__init__(config)
def __init__(self, config, context=None):
super(Transaction, self).__init__(config, context)

def setup(self):
"""Setup data or objects here
Expand Down

0 comments on commit 4783b16

Please sign in to comment.