Added api cleaning tools, moved parser commands in script.

This commit is contained in:
Davis Thames
2018-04-24 21:51:23 -05:00
parent 88094947d4
commit 19ea3f3b87
2 changed files with 5 additions and 5 deletions

View File

@@ -118,7 +118,7 @@ To regenerate fixture remove it from tests/fixtures and run tests again::
$ rm tests/fixtures/NAME.yaml $ rm tests/fixtures/NAME.yaml
$ py.test $ py.test
In order for py.test to have run, you will have had to create an environment variable containing a valid tiingo API key so that the test runner can make a valid api call. One way to do that is to:: In order for py.test to run, you will have had to create an environment variable containing a valid tiingo API key so that the test runner can make a valid api call. One way to do that is to::
$ export TIINGO_API_KEY='...insert api key here...' $ export TIINGO_API_KEY='...insert api key here...'

View File

@@ -9,10 +9,6 @@ zeroapiregex = r'(\[Token )0{40}(\])'
anyapiregex = r'(\[Token ).{40}(\])' anyapiregex = r'(\[Token ).{40}(\])'
zeroapistring = '[Token '+40*'0'+']' zeroapistring = '[Token '+40*'0'+']'
parser = argparse.ArgumentParser()
parser.add_argument("path", help="path to test fixtures",
nargs='?', default=fixturesDirectory)
args = parser.parse_args()
def api_key_detector(file): def api_key_detector(file):
''' '''
@@ -55,4 +51,8 @@ def main(path):
print("Changed {} files.".format(nFilesChanged)) print("Changed {} files.".format(nFilesChanged))
if __name__ == '__main__': if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("path", help="path to test fixtures",
nargs='?', default=fixturesDirectory)
args = parser.parse_args()
main(args.path) main(args.path)