Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1from __future__ import print_function
2from builtins import str
3import os
4import unittest
5import shutil
6import yaml
7from marshall_webapp.utKit import utKit
8from fundamentals import tools
9from os.path import expanduser
10from dryxPyramid.utKit import BaseTest
11home = expanduser("~")
13packageDirectory = utKit("").get_project_root()
14# settingsFile = packageDirectory + "/test_settings.yaml"
15settingsFile = home + "/git_repos/_misc_/settings/marshall/test_settings.yaml"
17exists = os.path.exists(settingsFile)
18if exists:
19 su = tools(
20 arguments={"settingsFile": settingsFile},
21 docString=__doc__,
22 logLevel="DEBUG",
23 options_first=False,
24 projectName=None,
25 defaultSettingsFile=False
26 )
27 arguments, settings, log, dbConn = su.setup()
29 # SETUP PATHS TO COMMON DIRECTORIES FOR TEST DATA
30 moduleDirectory = os.path.dirname(__file__)
31 pathToInputDir = moduleDirectory + "/input/"
32 pathToOutputDir = moduleDirectory + "/output/"
34 try:
35 shutil.rmtree(pathToOutputDir)
36 except:
37 pass
38 # COPY INPUT TO OUTPUT DIR
39 shutil.copytree(pathToInputDir, pathToOutputDir)
41 # Recursively create missing directories
42 if not os.path.exists(pathToOutputDir):
43 os.makedirs(pathToOutputDir)
46class test_views_services_refresh_sidebar_list_counts(BaseTest):
48 def __init__(self, *args, **kwargs):
49 BaseTest.__init__(self, *args, **kwargs)
51 self.testIni = moduleDirectory + "/../../../test.ini#marshall_webapp"
52 self.testSettings = settings
53 self.settings = settings
55 def test_views_services_refresh_sidebar_list_counts_put(self):
56 params = {}
57 respsonse = self.testapp.put(
58 "/actions/refresh_sidebar_list_counts", params=params)
59 self.assertEqual(respsonse.status_code, 200)