diff options
| -rw-r--r-- | Biz/PodcastItLater/Web.py | 61 | ||||
| -rw-r--r-- | worker.log | 29 |
2 files changed, 48 insertions, 42 deletions
diff --git a/Biz/PodcastItLater/Web.py b/Biz/PodcastItLater/Web.py index 6134a98..30ebf53 100644 --- a/Biz/PodcastItLater/Web.py +++ b/Biz/PodcastItLater/Web.py @@ -3108,11 +3108,7 @@ class TestAccountPage(BaseWebTest): """Test account page functionality.""" def setUp(self) -> None: -<<<<<<< Updated upstream - """Set up test client with logged-in user.""" -======= """Set up test with user.""" ->>>>>>> Stashed changes super().setUp() self.user_id, _ = Core.Database.create_user( "test@example.com", @@ -3120,23 +3116,34 @@ class TestAccountPage(BaseWebTest): ) self.client.post("/login", data={"email": "test@example.com"}) -<<<<<<< Updated upstream def test_account_page_logged_in(self) -> None: """Account page should render for logged-in users.""" + # Create some usage to verify stats are shown + ep_id = Core.Database.create_episode( + title="Test Episode", + audio_url="https://example.com/audio.mp3", + duration=300, + content_length=1000, + user_id=self.user_id, + author="Test Author", + original_url="https://example.com/article", + original_url_hash=Core.hash_url("https://example.com/article"), + ) + Core.Database.add_episode_to_user(self.user_id, ep_id) + response = self.client.get("/account") + self.assertEqual(response.status_code, 200) - self.assertIn("Account Management", response.text) + self.assertIn("My Account", response.text) self.assertIn("test@example.com", response.text) + self.assertIn("1 / 10", response.text) # Usage / Limit for free tier - def test_account_page_logged_out(self) -> None: - """Account page should redirect logged-out users.""" + def test_account_page_login_required(self) -> None: + """Should redirect to login if not logged in.""" self.client.post("/logout") response = self.client.get("/account", follow_redirects=False) self.assertEqual(response.status_code, 307) - self.assertEqual( - response.headers["location"], - "/?error=login_required", - ) + self.assertEqual(response.headers["location"], "/?error=login_required") def test_logout(self) -> None: """Logout should clear session.""" @@ -3169,36 +3176,6 @@ class TestAccountPage(BaseWebTest): response.headers["location"], "https://billing.stripe.com/test", ) -======= - def test_account_page_shows_usage(self) -> None: - """Account page should show usage stats.""" - # Create some usage - ep_id = Core.Database.create_episode( - title="Test Episode", - audio_url="https://example.com/audio.mp3", - duration=300, - content_length=1000, - user_id=self.user_id, - author="Test Author", - original_url="https://example.com/article", - original_url_hash=Core.hash_url("https://example.com/article"), - ) - Core.Database.add_episode_to_user(self.user_id, ep_id) - - response = self.client.get("/account") - - self.assertEqual(response.status_code, 200) - self.assertIn("1 / 10", response.text) # Usage / Limit for free tier - self.assertIn("My Account", response.text) - self.assertIn("test@example.com", response.text) - - def test_account_page_login_required(self) -> None: - """Should redirect to login if not logged in.""" - self.client.get("/logout") - response = self.client.get("/account", follow_redirects=False) - self.assertEqual(response.status_code, 307) - self.assertEqual(response.headers["location"], "/?error=login_required") ->>>>>>> Stashed changes def test() -> None: diff --git a/worker.log b/worker.log new file mode 100644 index 0000000..cd8b451 --- /dev/null +++ b/worker.log @@ -0,0 +1,29 @@ +Starting Worker Agent Loop + Worker Path: /home/ben/omni-worker-1 + Amp Binary: /home/ben/omni/node_modules/.bin/amp + Log File: /home/ben/omni-worker-1/_/llm/amp.log + Monitor: tail -f /home/ben/omni-worker-1/_/llm/amp.log + Press Ctrl+C to stop. +---------------------------------------------------------------- +Thu Nov 20 11:30:48 PM EST 2025: Syncing and checking for work... +Warning: Rebase conflict at start of loop. Aborting rebase and proceeding with local state. +branchless: processing 1 update: branch omni-worker-1 +branchless: processing 1 update: ref HEAD +Syncing tasks... +Importing tasks from live branch... +Imported tasks from .tasks/live-tasks.jsonl +Exported and consolidated tasks to .tasks/tasks.jsonl +Thu Nov 20 11:30:51 PM EST 2025: Claiming task t-144gQry: Create basic admin dashboard +info: version: .tasks/tasks.jsonl: 1231 +Exported and consolidated tasks to .tasks/tasks.jsonl +gitlint: checking commit message... +gitlint: OK (no violations in commit message) +branchless: processing 1 update: branch omni-worker-1 +branchless: processed commit: b6af81e task: sync database +Resuming existing branch task/t-144gQry +branchless: processing 1 update: ref HEAD +Switched to branch 'task/t-144gQry' +Imported tasks from .tasks/tasks.jsonl +branchless: processing checkout +Launching Amp to implement task... +./Omni/Agent/start-worker.sh: line 190: 917703 Killed "$AMP_BIN" --log-level debug --log-file "_/llm/amp.log" --dangerously-allow-all -x "$PROMPT" |
