Browse Source

Reformat files

pull/37/head
Dashie der otter 9 months ago
parent
commit
c3b22ac68b
Signed by: Dashie <dashie@sigpipe.me> GPG Key ID: C2D57B325840B755
4 changed files with 11 additions and 9 deletions
  1. 3
    1
      app.py
  2. 1
    1
      tests/conftest.py
  3. 5
    5
      tests/helpers.py
  4. 2
    2
      tests/test_utils.py

+ 3
- 1
app.py View File

@@ -305,7 +305,9 @@ def create_app(config_filename="config.py", app_name=None, register_blueprints=T
305 305
         pass
306 306
 
307 307
     @cron.command()
308
-    @click.option("--file", default=None, help="Local file to import instead of downloading", type=click.Path(exists=True))
308
+    @click.option(
309
+        "--file", default=None, help="Local file to import instead of downloading", type=click.Path(exists=True)
310
+    )
309 311
     def update_dxcc_from_cty(file):
310 312
         """Update DXCC tables from cty.xml"""
311 313
         print("-- STARTED on {0}".format(datetime.datetime.now()))

+ 1
- 1
tests/conftest.py View File

@@ -28,7 +28,7 @@ def app():
28 28
 @pytest.yield_fixture(scope="session")
29 29
 def db(app):
30 30
     _db.drop_all()
31
-    #_db.engine.connect().execute('CREATE EXTENSION IF NOT EXISTS "uuid-ossp";')
31
+    # _db.engine.connect().execute('CREATE EXTENSION IF NOT EXISTS "uuid-ossp";')
32 32
     _db.create_all()
33 33
 
34 34
     seed_config(_db)

+ 5
- 5
tests/helpers.py View File

@@ -39,13 +39,13 @@ _contacts_reg = re.compile(r"/contacts/(\d+)/edit")
39 39
 
40 40
 
41 41
 def get_contact_id(html, callsign):
42
-    soup = bs(html, 'html.parser')
43
-    table = soup.find('table', {'class': 'contacts-list'})
44
-    rows = table.findAll('tr')
42
+    soup = bs(html, "html.parser")
43
+    table = soup.find("table", {"class": "contacts-list"})
44
+    rows = table.findAll("tr")
45 45
     row = next(t for t in rows if t.findAll(text=re.compile(callsign)))
46
-    href = row.findAll('a', href=re.compile('edit'))
46
+    href = row.findAll("a", href=re.compile("edit"))
47 47
     assert len(href) > 0
48
-    href = href[0]['href']
48
+    href = href[0]["href"]
49 49
     match = _contacts_reg.search(href)
50 50
     assert match
51 51
     assert len(match.groups()) >= 1

+ 2
- 2
tests/test_utils.py View File

@@ -9,8 +9,8 @@ def test_debug_testing(app):
9 9
     I have no effing idea why.
10 10
     See conftest.py:db() for more.
11 11
     """
12
-    assert not app.config['DEBUG']
13
-    assert app.config['TESTING']
12
+    assert not app.config["DEBUG"]
13
+    assert app.config["TESTING"]
14 14
 
15 15
 
16 16
 def test_gen_random_str():

Loading…
Cancel
Save