Skip to content

Commit 8d76137

Browse files
committed
Rename frontend.py to sillysimple.py
1 parent 885937b commit 8d76137

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

cmd.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ BOLD=`tput bold`
1212
RESET=`tput sgr0`
1313

1414
run() {
15-
flask --app frontend.py run -p 32168
15+
flask --app sillysimple.py run -p 32168
1616
}
1717

1818
deploy() {
@@ -38,10 +38,10 @@ kill() {
3838
local REMOTE_SERVER=$(sed -n 2p $HOST_INFO_FILE)
3939
local REMOTE_USER=$(sed -n 3p $HOST_INFO_FILE)
4040

41-
printf "Killing frontend.py...\n"
41+
printf "Killing sillysimple.py...\n"
4242

43-
pid=$(ssh "$REMOTE_USER"@"$REMOTE_SERVER" ps ax | grep frontend.py | awk '{print $1}')
44-
printf "frontend.py PID: %d\n" "$pid"
43+
pid=$(ssh "$REMOTE_USER"@"$REMOTE_SERVER" ps ax | grep sillysimple.py | awk '{print $1}')
44+
printf "sillysimple.py PID: %d\n" "$pid"
4545
}
4646

4747
run_tests() {

frontend.py renamed to sillysimple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def comments_for_article():
169169
},
170170
"log_file": {
171171
"class": "logging.handlers.RotatingFileHandler",
172-
"filename": "frontend.log",
172+
"filename": "sillysimple.log",
173173
"formatter": "default",
174174
"mode": "a",
175175
"maxBytes": 10 * 1024,

test_main.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import frontend as ft
1+
import sillysimple as ss
22
import ulid
33
from pathlib import Path
44
import pytest
@@ -21,58 +21,58 @@ def cleanup():
2121

2222

2323
def test_load_comments():
24-
comments = ft.get_comments_for_slug("example", [".",])
24+
comments = ss.get_comments_for_slug("example", [".",])
2525
assert len(comments) == 1
2626

2727
def test_create_comment(file_cleanup):
28-
comments = ft.get_comments_for_slug("example", [".",])
28+
comments = ss.get_comments_for_slug("example", [".",])
2929

3030
comment_fname = str(ulid.new())
31-
c = ft.Comment()
31+
c = ss.Comment()
3232
c.created_by = "Leon"
3333
c.created_by_contact = "leon@gmail.com"
3434
c.paragraphs = "Do you dream, Elliot?"
3535

3636
path = c.dump_into_file(["example",], comment_fname)
3737
file_cleanup.append(path)
3838

39-
comments = ft.get_comments_for_slug("example", [".",])
39+
comments = ss.get_comments_for_slug("example", [".",])
4040

4141
assert comments[1].created_by == "Leon"
4242
assert len(comments) == 2
4343

4444
def test_comment_api_from_path():
4545
p = Path("comments", "example", "01H7A86Y8EM4DM3FM25EWPHB8W.txt")
46-
c = ft.Comment.from_path(p)
46+
c = ss.Comment.from_path(p)
4747
#print(c)
4848

4949
assert len(c.paragraphs) == 3
5050

5151
def test_comment_api_into_file_author_fail():
5252
comment_fname = str(ulid.new())
5353

54-
comment = ft.Comment()
54+
comment = ss.Comment()
5555
comment.created_by_contact = "leon@gmail.com"
5656
comment.paragraphs = ["Do you dream, Elliot?", "You scraping so hard..."]
5757

5858
assert comment.dump_into_file(["example",], comment_fname) is None
5959

60-
comments = ft.get_comments_for_slug("example", [".",])
60+
comments = ss.get_comments_for_slug("example", [".",])
6161

6262
def test_comment_api_into_file(file_cleanup):
63-
comments = ft.get_comments_for_slug("example", [".",])
63+
comments = ss.get_comments_for_slug("example", [".",])
6464

6565
comment_fname = str(ulid.new())
6666

67-
comment = ft.Comment()
67+
comment = ss.Comment()
6868
comment.created_by = "Elliot"
6969
comment.created_by_contact = "elliot@protonmail.com"
7070
comment.paragraphs = ["How do I know which one's for me?",]
7171

7272
result_path = comment.dump_into_file(["example",], comment_fname)
7373
file_cleanup.append(result_path)
7474

75-
comments = ft.get_comments_for_slug("example", [".",])
75+
comments = ss.get_comments_for_slug("example", [".",])
7676

7777
assert len(comments[-1].paragraphs) == 1
7878
assert comments[-1].created_by == "Elliot"

0 commit comments

Comments
 (0)