惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
小众软件
小众软件
Vercel News
Vercel News
Last Week in AI
Last Week in AI
H
Help Net Security
The Cloudflare Blog
L
LangChain Blog
Microsoft Security Blog
Microsoft Security Blog
B
Blog RSS Feed
云风的 BLOG
云风的 BLOG
I
InfoQ
U
Unit 42
美团技术团队
人人都是产品经理
人人都是产品经理
雷峰网
雷峰网
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
Y
Y Combinator Blog
Hugging Face - Blog
Hugging Face - Blog
A
About on SuperTechFans
宝玉的分享
宝玉的分享
量子位
博客园_首页

Stonecharioteer on Tech

I Traced My Traffic Through a Home Tailscale Exit Node What Was I Reading Last? In Three Not-So-Easy Pieces Dogfooding Is Hard Code blocks in your books, finally GoForGo v0.9.0 Merrilin - We built an app to read books I use a Macbook now Data Structures & Algorithms - Preparing for Interviews Using a local DNS namespace for local service discovery Direction KOllector - Publishing KOReader Highlights gbt: branches touched in the last 24 hours A Soiree into Symbols in Ruby Some Smalltalk about Ruby Loops Ruby Blocks Returning from Ruby Blocks, Procs and Lambdas My Linux Laptop Finally Works: How Claude Helped Me Fix Years of Annoyances TIL: Watchexec - Modern File Watching for Development Workflows A Less Busy Mind GoForGo - Learn Go through live examples Migrating My Old Blog to Hugo with Claude The Qtile Window Manager: A Python-Powered Tiling Experience Read the RFCs that Built the Internet Py-x-Protobuf - Or How I Learned to Stop Worrying and Love Protocol Buffers Python Reverse a List New Beginnings Leaving ChainSafe Systems Screen Lock for Cinnamon Desktop using Zenity and Terminal Commands Crews Not Teams A System for Getting Better at LeetCode
TIL: Dash Testing, Docker Compose, and Python Mocking
2020-07-24 · via Stonecharioteer on Tech

Web Development and Testing

Dash Framework Testing

Flask-Dash Integration Best Practices

  • Always ensure that dash registration in a Flask-Dash app is configurable
  • Might want to not load dash when testing backend only
  • Separation of concerns between backend API and frontend visualization
  • Enables more targeted testing strategies

Python Mock Module Best Practices

  • When mocking python functions in a flask test, ensure you reference the module where the function is called, not where it originates from
  • Common pitfall: mocking at the wrong import level
  • Mock at the point of use, not the point of definition
  • Critical for effective unit testing in complex applications

Infrastructure and Networking

Docker Compose Development Insights

  • docker-compose has no docstrings
  • Interesting observation about code documentation practices
  • Even popular tools can have documentation gaps
  • Reminder of the importance of good code documentation

DNS and Network Tools

Pi-hole Architecture

  • pihole’s Faster than light engine is a fork of dnsmasq
  • Built on proven DNS server technology
  • Optimized for ad-blocking and DNS filtering
  • Demonstrates how open source projects build on each other

Command Line Tools

  • argparse does support sub-commands
  • Python’s built-in argument parsing library is more capable than often realized
  • Enables building complex CLI interfaces with nested commands
  • Alternative to third-party libraries like Click for simpler use cases