diff --git a/cry/feed.py b/cry/feed.py index e2883d8..7be8cff 100644 --- a/cry/feed.py +++ b/cry/feed.py @@ -284,6 +284,7 @@ def clean_text(text: str) -> str: writer = io.StringIO() cleaner = Cleaner(writer) cleaner.feed(text) + cleaner.close() return MULTI_SPACES.sub(" ", writer.getvalue()) diff --git a/tests/feeds/steveklabnik.com.xml b/tests/feeds/steveklabnik.com.xml new file mode 100644 index 0000000..fe1851c --- /dev/null +++ b/tests/feeds/steveklabnik.com.xml @@ -0,0 +1,17 @@ +HTTP/2 200 +accept-ranges: bytes +access-control-allow-origin: * +age: 258400 +cache-control: public, max-age=0, must-revalidate +content-disposition: inline; filename="feed.xml" +content-type: application/xml +date: Sun, 20 Oct 2024 14:41:44 GMT +etag: "4bbaebf9c0d2a62809e4232f4b6cdf80" +last-modified: Thu, 17 Oct 2024 14:55:04 GMT +server: Vercel +strict-transport-security: max-age=63072000 +x-vercel-cache: HIT +x-vercel-id: pdx1::l9zzd-1729435304683-c8800ee6bc07 +content-length: 59446 + +Steve KlabnikSteve Klabniks bloghttps://steveklabnik.com/When should I use String vs &str?https://steveklabnik.com/writing/when-should-i-use-string-vs-str/https://steveklabnik.com/writing/when-should-i-use-string-vs-str/Wed, 16 Oct 2024 00:00:00 GMTAgainst Nameshttps://steveklabnik.com/writing/against-names/https://steveklabnik.com/writing/against-names/Mon, 12 Aug 2024 00:00:00 GMTHow Does BlueSky Work?https://steveklabnik.com/writing/how-does-bluesky-work/https://steveklabnik.com/writing/how-does-bluesky-work/Sat, 24 Feb 2024 00:00:00 GMTUsing the Oxide Consolehttps://steveklabnik.com/writing/using-the-oxide-console/https://steveklabnik.com/writing/using-the-oxide-console/Sat, 17 Feb 2024 00:00:00 GMTMemory Safety is a Red Herringhttps://steveklabnik.com/writing/memory-safety-is-a-red-herring/https://steveklabnik.com/writing/memory-safety-is-a-red-herring/Thu, 21 Dec 2023 00:00:00 GMTUpdating Buckhttps://steveklabnik.com/writing/updating-buck/https://steveklabnik.com/writing/updating-buck/Mon, 08 May 2023 00:00:00 GMTUsing Crates.io with Buckhttps://steveklabnik.com/writing/using-cratesio-with-buck/https://steveklabnik.com/writing/using-cratesio-with-buck/Thu, 27 Apr 2023 00:00:00 GMTUsing buck to build Rust projectshttps://steveklabnik.com/writing/using-buck-to-build-rust-projects/https://steveklabnik.com/writing/using-buck-to-build-rust-projects/Thu, 13 Apr 2023 00:00:00 GMTRust's Golden Rulehttps://steveklabnik.com/writing/rusts-golden-rule/https://steveklabnik.com/writing/rusts-golden-rule/Mon, 27 Mar 2023 00:00:00 GMTYou're probably learning a technology in its seventh season, not its pilothttps://steveklabnik.com/writing/you-re-probably-learning-a-technology-in-its-seventh-season-not-its-pilot/https://steveklabnik.com/writing/you-re-probably-learning-a-technology-in-its-seventh-season-not-its-pilot/Fri, 27 Jan 2023 00:00:00 GMTToo many words about Rust's function syntaxhttps://steveklabnik.com/writing/too-many-words-about-rusts-function-syntax/https://steveklabnik.com/writing/too-many-words-about-rusts-function-syntax/Tue, 03 Jan 2023 00:00:00 GMTTen Years of Ru...ewriting my websitehttps://steveklabnik.com/writing/ten-years-of-ru---ewriting-my-website/https://steveklabnik.com/writing/ten-years-of-ru---ewriting-my-website/Wed, 21 Dec 2022 00:00:00 GMTAre out parameters idiomatic in Rust?https://steveklabnik.com/writing/are-out-parameters-idiomatic-in-rust/https://steveklabnik.com/writing/are-out-parameters-idiomatic-in-rust/Fri, 16 Oct 2020 00:00:00 GMTThe CXX Debatehttps://steveklabnik.com/writing/the-cxx-debate/https://steveklabnik.com/writing/the-cxx-debate/Sat, 22 Aug 2020 00:00:00 GMTToday is my first day at Oxide Computer Companyhttps://steveklabnik.com/writing/today-is-my-first-day-at-oxide-computer-company/https://steveklabnik.com/writing/today-is-my-first-day-at-oxide-computer-company/Mon, 15 Jun 2020 00:00:00 GMTThe next iteration of my blogshttps://steveklabnik.com/writing/the-next-iteration-of-my-blogs/https://steveklabnik.com/writing/the-next-iteration-of-my-blogs/Mon, 08 Jun 2020 00:00:00 GMTHow often does Rust change?https://steveklabnik.com/writing/how-often-does-rust-change/https://steveklabnik.com/writing/how-often-does-rust-change/Sat, 11 Apr 2020 00:00:00 GMT"C is how the computer works" is a dangerous mindset for C programmershttps://steveklabnik.com/writing/c-is-how-the-computer-works-is-a-dangerous-mindset-for-c-programmers/https://steveklabnik.com/writing/c-is-how-the-computer-works-is-a-dangerous-mindset-for-c-programmers/Tue, 31 Mar 2020 00:00:00 GMTA sad day for Rusthttps://steveklabnik.com/writing/a-sad-day-for-rust/https://steveklabnik.com/writing/a-sad-day-for-rust/Fri, 17 Jan 2020 00:00:00 GMT"C is not how the computer works" can lead to inefficient codehttps://steveklabnik.com/writing/c-is-not-how-the-computer-works-can-lead-to-inefficient-code/https://steveklabnik.com/writing/c-is-not-how-the-computer-works-can-lead-to-inefficient-code/Fri, 25 Oct 2019 00:00:00 GMTPorting steveklabnik.com to Workers Sites and Zolahttps://steveklabnik.com/writing/porting-steveklabnik-com-to-workers-sites-and-zola/https://steveklabnik.com/writing/porting-steveklabnik-com-to-workers-sites-and-zola/Thu, 26 Sep 2019 00:00:00 GMTThe culture war at the heart of open sourcehttps://steveklabnik.com/writing/the-culture-war-at-the-heart-of-open-source/https://steveklabnik.com/writing/the-culture-war-at-the-heart-of-open-source/Sun, 26 May 2019 00:00:00 GMTI'm joining Cloudflarehttps://steveklabnik.com/writing/i-m-joining-cloudflare/https://steveklabnik.com/writing/i-m-joining-cloudflare/Fri, 05 Apr 2019 00:00:00 GMTWhat comes after open sourcehttps://steveklabnik.com/writing/what-comes-after-open-source/https://steveklabnik.com/writing/what-comes-after-open-source/Tue, 02 Apr 2019 00:00:00 GMTRust has finally outgrown mehttps://steveklabnik.com/writing/rust-has-finally-outgrown-me/https://steveklabnik.com/writing/rust-has-finally-outgrown-me/Fri, 29 Mar 2019 00:00:00 GMTLearning Adahttps://steveklabnik.com/writing/learning-ada/https://steveklabnik.com/writing/learning-ada/Tue, 26 Mar 2019 00:00:00 GMTWhat's next for SemVerhttps://steveklabnik.com/writing/what-s-next-for-semver/https://steveklabnik.com/writing/what-s-next-for-semver/Mon, 11 Feb 2019 00:00:00 GMTthank u, nexthttps://steveklabnik.com/writing/thank-u-next/https://steveklabnik.com/writing/thank-u-next/Sun, 06 Jan 2019 00:00:00 GMTThoughts on Rust in 2019https://steveklabnik.com/writing/thoughts-on-rust-in-2019/https://steveklabnik.com/writing/thoughts-on-rust-in-2019/Thu, 27 Dec 2018 00:00:00 GMTSix years with Rusthttps://steveklabnik.com/writing/six-years-with-rust/https://steveklabnik.com/writing/six-years-with-rust/Fri, 21 Dec 2018 00:00:00 GMTWhy is Clojure so stable?https://steveklabnik.com/writing/why-is-clojure-so-stable/https://steveklabnik.com/writing/why-is-clojure-so-stable/Tue, 18 Dec 2018 00:00:00 GMTBorrow checking, escape analysis, and the generational hypothesishttps://steveklabnik.com/writing/borrow-checking-escape-analysis-and-the-generational-hypothesis/https://steveklabnik.com/writing/borrow-checking-escape-analysis-and-the-generational-hypothesis/Wed, 10 Oct 2018 00:00:00 GMTShould you learn C to "learn how the computer works"?https://steveklabnik.com/writing/should-you-learn-c-to-learn-how-the-computer-works/https://steveklabnik.com/writing/should-you-learn-c-to-learn-how-the-computer-works/Tue, 02 Oct 2018 00:00:00 GMTYou can't "turn off the borrow checker" in Rusthttps://steveklabnik.com/writing/you-can-t-turn-off-the-borrow-checker-in-rust/https://steveklabnik.com/writing/you-can-t-turn-off-the-borrow-checker-in-rust/Fri, 14 Sep 2018 00:00:00 GMTIs WebAssembly the return of Java Applets & Flash?https://steveklabnik.com/writing/is-webassembly-the-return-of-java-applets-flash/https://steveklabnik.com/writing/is-webassembly-the-return-of-java-applets-flash/Wed, 25 Jul 2018 00:00:00 GMTWebAssembly is more than just the webhttps://steveklabnik.com/writing/webassembly-is-more-than-just-the-web/https://steveklabnik.com/writing/webassembly-is-more-than-just-the-web/Fri, 13 Jul 2018 00:00:00 GMT"The Expressive C++17 Coding Challenge (in Rust)" revisitedhttps://steveklabnik.com/writing/the-expressive-c-17-coding-challenge-in-rust-revisited/https://steveklabnik.com/writing/the-expressive-c-17-coding-challenge-in-rust-revisited/Wed, 14 Feb 2018 00:00:00 GMT0b100000https://steveklabnik.com/writing/2-sup-5/https://steveklabnik.com/writing/2-sup-5/Thu, 25 Jan 2018 00:00:00 GMTLooking back at Rust in 2018https://steveklabnik.com/writing/looking-back-at-rust-in-2018/https://steveklabnik.com/writing/looking-back-at-rust-in-2018/Tue, 09 Jan 2018 00:00:00 GMTFive years with Rusthttps://steveklabnik.com/writing/five-years-with-rust/https://steveklabnik.com/writing/five-years-with-rust/Thu, 21 Dec 2017 00:00:00 GMTUser-Agent: moz://ahttps://steveklabnik.com/writing/user-agent-moz-a/https://steveklabnik.com/writing/user-agent-moz-a/Tue, 12 Dec 2017 00:00:00 GMT"The Expressive C++17 Coding Challenge" in Rusthttps://steveklabnik.com/writing/the-expressive-c-17-coding-challenge-in-rust/https://steveklabnik.com/writing/the-expressive-c-17-coding-challenge-in-rust/Wed, 25 Oct 2017 00:00:00 GMTWant to join the Rust docs team?https://steveklabnik.com/writing/want-to-join-the-rust-docs-team/https://steveklabnik.com/writing/want-to-join-the-rust-docs-team/Fri, 24 Mar 2017 00:00:00 GMTAn overview of macros in Rusthttps://steveklabnik.com/writing/an-overview-of-macros-in-rust/https://steveklabnik.com/writing/an-overview-of-macros-in-rust/Tue, 24 Jan 2017 00:00:00 GMTAnnouncing Rust Contributorshttps://steveklabnik.com/writing/announcing-rust-contributors/https://steveklabnik.com/writing/announcing-rust-contributors/Thu, 12 Jan 2017 00:00:00 GMTFire Mario not fire flowershttps://steveklabnik.com/writing/fire-mario-not-fire-flowers/https://steveklabnik.com/writing/fire-mario-not-fire-flowers/Thu, 29 Dec 2016 00:00:00 GMTRust is more than safetyhttps://steveklabnik.com/writing/rust-is-more-than-safety/https://steveklabnik.com/writing/rust-is-more-than-safety/Wed, 28 Dec 2016 00:00:00 GMTFour years with Rusthttps://steveklabnik.com/writing/four-years-with-rust/https://steveklabnik.com/writing/four-years-with-rust/Wed, 21 Dec 2016 00:00:00 GMTWhat's new with "The Rust Programming Language"https://steveklabnik.com/writing/whats-new-with-the-rust-programming-language/https://steveklabnik.com/writing/whats-new-with-the-rust-programming-language/Mon, 15 Aug 2016 00:00:00 GMTStructure literals vs. constructors in Rusthttps://steveklabnik.com/writing/structure-literals-vs-constructors-in-rust/https://steveklabnik.com/writing/structure-literals-vs-constructors-in-rust/Tue, 26 Jul 2016 00:00:00 GMTA eulogy for my 20shttps://steveklabnik.com/writing/a-eulogy-for-my-20s/https://steveklabnik.com/writing/a-eulogy-for-my-20s/Sun, 24 Jan 2016 00:00:00 GMTDocemberhttps://steveklabnik.com/writing/docember/https://steveklabnik.com/writing/docember/Tue, 01 Dec 2015 00:00:00 GMTRescuing Resque (again)https://steveklabnik.com/writing/rescuing-resque-again/https://steveklabnik.com/writing/rescuing-resque-again/Wed, 28 Oct 2015 00:00:00 GMT"The Rust Programming Language" will be published by No Starch Presshttps://steveklabnik.com/writing/the-rust-programming-language-will-be-published-by-no-starch-press/https://steveklabnik.com/writing/the-rust-programming-language-will-be-published-by-no-starch-press/Tue, 08 Sep 2015 00:00:00 GMTCommunity Versions for Rusthttps://steveklabnik.com/writing/community-versions-for-rust/https://steveklabnik.com/writing/community-versions-for-rust/Sun, 23 Aug 2015 00:00:00 GMTEmber Data: ‘DS’ is not definedhttps://steveklabnik.com/writing/ember-data--ds-is-not-defined/https://steveklabnik.com/writing/ember-data--ds-is-not-defined/Sun, 05 Jul 2015 00:00:00 GMTThe language strangeness budgethttps://steveklabnik.com/writing/the-language-strangeness-budget/https://steveklabnik.com/writing/the-language-strangeness-budget/Fri, 26 Jun 2015 00:00:00 GMTOuroboroshttps://steveklabnik.com/writing/ouroboros/https://steveklabnik.com/writing/ouroboros/Mon, 18 May 2015 00:00:00 GMTHopehttps://steveklabnik.com/writing/hope/https://steveklabnik.com/writing/hope/Fri, 08 May 2015 00:00:00 GMTAn introduction to economics under capitalismhttps://steveklabnik.com/writing/an-introduction-to-economics-under-capitalism/https://steveklabnik.com/writing/an-introduction-to-economics-under-capitalism/Tue, 10 Mar 2015 00:00:00 GMTA new introduction to Rusthttps://steveklabnik.com/writing/a-new-introduction-to-rust/https://steveklabnik.com/writing/a-new-introduction-to-rust/Fri, 27 Feb 2015 00:00:00 GMTUpdate GitHub Pages with Travis CIhttps://steveklabnik.com/writing/update-github-pages-with-travis-ci/https://steveklabnik.com/writing/update-github-pages-with-travis-ci/Tue, 16 Dec 2014 00:00:00 GMTI'm going writeonly on Twitter for a whilehttps://steveklabnik.com/writing/im-going-writeonly-on-twitter-for-a-while/https://steveklabnik.com/writing/im-going-writeonly-on-twitter-for-a-while/Wed, 03 Sep 2014 00:00:00 GMTRust's documentation is about to drastically improvehttps://steveklabnik.com/writing/rusts-documentation-is-about-to-drastically-improve/https://steveklabnik.com/writing/rusts-documentation-is-about-to-drastically-improve/Mon, 16 Jun 2014 00:00:00 GMTSFhttps://steveklabnik.com/writing/sf/https://steveklabnik.com/writing/sf/Tue, 20 May 2014 00:00:00 GMTHypermedia FizzBuzzhttps://steveklabnik.com/writing/hypermedia-fizzbuzz/https://steveklabnik.com/writing/hypermedia-fizzbuzz/Fri, 02 May 2014 00:00:00 GMTHow to be an open source gardenerhttps://steveklabnik.com/writing/how-to-be-an-open-source-gardener/https://steveklabnik.com/writing/how-to-be-an-open-source-gardener/Mon, 14 Apr 2014 00:00:00 GMTIs npm worth 26MM?https://steveklabnik.com/writing/is-npm-worth-26mm/https://steveklabnik.com/writing/is-npm-worth-26mm/Wed, 12 Feb 2014 00:00:00 GMTAnnouncing Emoji 1.0https://steveklabnik.com/writing/announcing-emoji-1-0/https://steveklabnik.com/writing/announcing-emoji-1-0/Mon, 10 Feb 2014 00:00:00 GMTA 30 minute introduction to Rusthttps://steveklabnik.com/writing/a-30-minute-introduction-to-rust/https://steveklabnik.com/writing/a-30-minute-introduction-to-rust/Sat, 11 Jan 2014 00:00:00 GMT2013: year in reviewhttps://steveklabnik.com/writing/2013--year-in-review/https://steveklabnik.com/writing/2013--year-in-review/Tue, 31 Dec 2013 00:00:00 GMTRust is surprisingly expressivehttps://steveklabnik.com/writing/rust-is-surprisingly-expressive/https://steveklabnik.com/writing/rust-is-surprisingly-expressive/Sat, 28 Dec 2013 00:00:00 GMTHow Dogecoin changed my perspective on cryptocurrencyhttps://steveklabnik.com/writing/how-dogecoin-changed-my-perspective-on-cryptocurrency/https://steveklabnik.com/writing/how-dogecoin-changed-my-perspective-on-cryptocurrency/Sat, 21 Dec 2013 00:00:00 GMTgit, history modification, and libuvhttps://steveklabnik.com/writing/git-history-modification-and-libuv/https://steveklabnik.com/writing/git-history-modification-and-libuv/Sat, 30 Nov 2013 00:00:00 GMTWhy I'm partnering with Balancedhttps://steveklabnik.com/writing/why-im-partnering-with-balanced/https://steveklabnik.com/writing/why-im-partnering-with-balanced/Thu, 21 Nov 2013 00:00:00 GMTOn leftist infightinghttps://steveklabnik.com/writing/on-leftist-infighting/https://steveklabnik.com/writing/on-leftist-infighting/Mon, 18 Nov 2013 00:00:00 GMTAbstract vs concretehttps://steveklabnik.com/writing/abstract-vs-concrete/https://steveklabnik.com/writing/abstract-vs-concrete/Thu, 14 Nov 2013 00:00:00 GMTPointers in Rust, a guidehttps://steveklabnik.com/writing/pointers-in-rust-a-guide/https://steveklabnik.com/writing/pointers-in-rust-a-guide/Fri, 18 Oct 2013 00:00:00 GMTNew Beginningshttps://steveklabnik.com/writing/new-beginnings/https://steveklabnik.com/writing/new-beginnings/Tue, 01 Oct 2013 00:00:00 GMTKeep Saturdays sacredhttps://steveklabnik.com/writing/keep-saturdays-sacred/https://steveklabnik.com/writing/keep-saturdays-sacred/Sat, 28 Sep 2013 00:00:00 GMTThankfulnesshttps://steveklabnik.com/writing/thankfulness/https://steveklabnik.com/writing/thankfulness/Tue, 24 Sep 2013 00:00:00 GMTThe CLOSURE companionhttps://steveklabnik.com/writing/the-closure-companion/https://steveklabnik.com/writing/the-closure-companion/Thu, 19 Sep 2013 00:00:00 GMTResque 1.25.0 has been releasedhttps://steveklabnik.com/writing/resque-1-25-0-has-been-released/https://steveklabnik.com/writing/resque-1-25-0-has-been-released/Mon, 16 Sep 2013 00:00:00 GMTJust the regularly scheduled apocalypsehttps://steveklabnik.com/writing/just-the-regularly-scheduled-apocalypse/https://steveklabnik.com/writing/just-the-regularly-scheduled-apocalypse/Tue, 10 Sep 2013 00:00:00 GMTEmoji licensinghttps://steveklabnik.com/writing/emoji-licensing/https://steveklabnik.com/writing/emoji-licensing/Tue, 06 Aug 2013 00:00:00 GMTredis-namespace 1.3.1 security releasehttps://steveklabnik.com/writing/redis-namespace-1-3-1--security-release/https://steveklabnik.com/writing/redis-namespace-1-3-1--security-release/Sat, 03 Aug 2013 00:00:00 GMTBeware subclassing Ruby core classeshttps://steveklabnik.com/writing/beware-subclassing-ruby-core-classes/https://steveklabnik.com/writing/beware-subclassing-ruby-core-classes/Wed, 24 Jul 2013 00:00:00 GMTResque 1.25.0.pre has been releasedhttps://steveklabnik.com/writing/resque-1-25-0-pre-has-been-released/https://steveklabnik.com/writing/resque-1-25-0-pre-has-been-released/Tue, 23 Jul 2013 00:00:00 GMTRemoving Turbolinks from Rails 4https://steveklabnik.com/writing/removing-turbolinks-from-rails-4/https://steveklabnik.com/writing/removing-turbolinks-from-rails-4/Tue, 25 Jun 2013 00:00:00 GMTTwitter ghostshttps://steveklabnik.com/writing/twitter-ghosts/https://steveklabnik.com/writing/twitter-ghosts/Sat, 22 Jun 2013 00:00:00 GMTReturning to Free Software, a guidehttps://steveklabnik.com/writing/returning-to-free-software-a-guide/https://steveklabnik.com/writing/returning-to-free-software-a-guide/Sat, 15 Jun 2013 00:00:00 GMTRust-y Scraps: iterating with a stephttps://steveklabnik.com/writing/rust--y-scraps--iterating-with-a-step/https://steveklabnik.com/writing/rust--y-scraps--iterating-with-a-step/Thu, 30 May 2013 00:00:00 GMTRails 4.0.0-beta1 to Rails 4.0.0-rc1https://steveklabnik.com/writing/rails-4-0-0-beta1-to-rails-4-0-0-rc1/https://steveklabnik.com/writing/rails-4-0-0-beta1-to-rails-4-0-0-rc1/Tue, 21 May 2013 00:00:00 GMTDitching Google Chat with XMPPhttps://steveklabnik.com/writing/ditching-google--chat-with-xmpp/https://steveklabnik.com/writing/ditching-google--chat-with-xmpp/Thu, 16 May 2013 00:00:00 GMTThe profile link relation and youhttps://steveklabnik.com/writing/the-profile-link-relation-and-you/https://steveklabnik.com/writing/the-profile-link-relation-and-you/Mon, 06 May 2013 00:00:00 GMTClosurehttps://steveklabnik.com/writing/closure/https://steveklabnik.com/writing/closure/Fri, 19 Apr 2013 00:00:00 GMTUpgrading from Rust 0.5 to 0.6https://steveklabnik.com/writing/upgrading-from-rust-0-5-to-0-6/https://steveklabnik.com/writing/upgrading-from-rust-0-5-to-0-6/Sun, 07 Apr 2013 00:00:00 GMTDeleuze for Developers: will smooth space/open source suffice to save us?https://steveklabnik.com/writing/deleuze-for-developers-will-smooth-spaceopen-source-suffice-to-save-us/https://steveklabnik.com/writing/deleuze-for-developers-will-smooth-spaceopen-source-suffice-to-save-us/Thu, 14 Mar 2013 00:00:00 GMTTravis build matrix for Railshttps://steveklabnik.com/writing/travis-build-matrix-for-rails/https://steveklabnik.com/writing/travis-build-matrix-for-rails/Sun, 10 Mar 2013 00:00:00 GMTAnnouncing security_release_practicehttps://steveklabnik.com/writing/announcing-securityreleasepractice/https://steveklabnik.com/writing/announcing-securityreleasepractice/Fri, 08 Mar 2013 00:00:00 GMTGoing vimganhttps://steveklabnik.com/writing/going-vimgan/https://steveklabnik.com/writing/going-vimgan/Wed, 06 Mar 2013 00:00:00 GMTUsing puma on Herokuhttps://steveklabnik.com/writing/using-puma-on-heroku/https://steveklabnik.com/writing/using-puma-on-heroku/Sun, 24 Feb 2013 00:00:00 GMTI'm writing "Rails 4 in Action"!https://steveklabnik.com/writing/i-m-writing--rails-4-in-action--/https://steveklabnik.com/writing/i-m-writing--rails-4-in-action--/Wed, 13 Feb 2013 00:00:00 GMTThe next iteration of "Designing Hypermedia APIs"https://steveklabnik.com/writing/the-next-iteration-of-designing-hypermedia-apis/https://steveklabnik.com/writing/the-next-iteration-of-designing-hypermedia-apis/Tue, 12 Feb 2013 00:00:00 GMTRuby on Rails maintenance policyhttps://steveklabnik.com/writing/ruby-on-rails-maintenance-policy/https://steveklabnik.com/writing/ruby-on-rails-maintenance-policy/Mon, 11 Feb 2013 00:00:00 GMTEmber.js and accessibilityhttps://steveklabnik.com/writing/emberjs-and-accessibility/https://steveklabnik.com/writing/emberjs-and-accessibility/Thu, 07 Feb 2013 00:00:00 GMTHow to not rely on rubygems.org for developmenthttps://steveklabnik.com/writing/how-to-not-rely-on-rubygemsorg-for-deployment/https://steveklabnik.com/writing/how-to-not-rely-on-rubygemsorg-for-deployment/Thu, 31 Jan 2013 00:00:00 GMTNodehttps://steveklabnik.com/writing/node/https://steveklabnik.com/writing/node/Wed, 23 Jan 2013 00:00:00 GMT_why is a role, not a personhttps://steveklabnik.com/writing/why-is-a-role-not-a-person/https://steveklabnik.com/writing/why-is-a-role-not-a-person/Wed, 16 Jan 2013 00:00:00 GMTDraper 1.0.0 releasedhttps://steveklabnik.com/writing/draper-1-0-0-released/https://steveklabnik.com/writing/draper-1-0-0-released/Mon, 14 Jan 2013 00:00:00 GMTRails has two default stackshttps://steveklabnik.com/writing/rails-has-two-default-stacks/https://steveklabnik.com/writing/rails-has-two-default-stacks/Mon, 14 Jan 2013 00:00:00 GMT2012: year in reviewhttps://steveklabnik.com/writing/2012-year-in-review/https://steveklabnik.com/writing/2012-year-in-review/Sat, 29 Dec 2012 00:00:00 GMTMost things I do are interconnectedhttps://steveklabnik.com/writing/most-things-i-do-are-interconnected/https://steveklabnik.com/writing/most-things-i-do-are-interconnected/Fri, 28 Dec 2012 00:00:00 GMTI invented hypermedia APIs by accidenthttps://steveklabnik.com/writing/i-invented-hypermedia-apis-by-accident/https://steveklabnik.com/writing/i-invented-hypermedia-apis-by-accident/Fri, 21 Dec 2012 00:00:00 GMTAn early Christmas present for youhttps://steveklabnik.com/writing/an-early-christmas-present-for-you/https://steveklabnik.com/writing/an-early-christmas-present-for-you/Wed, 19 Dec 2012 00:00:00 GMTAnnouncing request_storehttps://steveklabnik.com/writing/announcing-requeststore/https://steveklabnik.com/writing/announcing-requeststore/Mon, 17 Dec 2012 00:00:00 GMTGetting started with chrubyhttps://steveklabnik.com/writing/getting-started-with-chruby/https://steveklabnik.com/writing/getting-started-with-chruby/Thu, 13 Dec 2012 00:00:00 GMTDeleuze for developers: deterritorializationhttps://steveklabnik.com/writing/deleuze-for-developers-deterritorialization/https://steveklabnik.com/writing/deleuze-for-developers-deterritorialization/Fri, 07 Dec 2012 00:00:00 GMTDeleuze for developers: assemblageshttps://steveklabnik.com/writing/deleuze-for-developers-assemblages/https://steveklabnik.com/writing/deleuze-for-developers-assemblages/Mon, 03 Dec 2012 00:00:00 GMTDraper 1.0.0.beta2 releasehttps://steveklabnik.com/writing/draper-1-0-0-beta2-release/https://steveklabnik.com/writing/draper-1-0-0-beta2-release/Mon, 03 Dec 2012 00:00:00 GMTDraper 1.0.0.beta1 releasehttps://steveklabnik.com/writing/draper-1-0-0-beta1-release/https://steveklabnik.com/writing/draper-1-0-0-beta1-release/Fri, 30 Nov 2012 00:00:00 GMTIntroducing the rails-api projecthttps://steveklabnik.com/writing/introducing-the-rails-api-project/https://steveklabnik.com/writing/introducing-the-rails-api-project/Thu, 22 Nov 2012 00:00:00 GMTNarrativeshttps://steveklabnik.com/writing/narratives/https://steveklabnik.com/writing/narratives/Sun, 18 Nov 2012 00:00:00 GMTHow to squash commits in a GitHub pull requesthttps://steveklabnik.com/writing/how-to-squash-commits-in-a-github-pull-request/https://steveklabnik.com/writing/how-to-squash-commits-in-a-github-pull-request/Thu, 08 Nov 2012 00:00:00 GMTTheory and practicehttps://steveklabnik.com/writing/theory-and-practice/https://steveklabnik.com/writing/theory-and-practice/Tue, 06 Nov 2012 00:00:00 GMTI got hit by a car todayhttps://steveklabnik.com/writing/i-got-hit-by-a-car-today/https://steveklabnik.com/writing/i-got-hit-by-a-car-today/Thu, 25 Oct 2012 00:00:00 GMTLiving with a terrible taste in musichttps://steveklabnik.com/writing/living-with-a-terrible-taste-in-music/https://steveklabnik.com/writing/living-with-a-terrible-taste-in-music/Fri, 12 Oct 2012 00:00:00 GMTRun Rails with custom patcheshttps://steveklabnik.com/writing/run-rails-with-custom-patches/https://steveklabnik.com/writing/run-rails-with-custom-patches/Thu, 04 Oct 2012 00:00:00 GMTHow do you find the time?https://steveklabnik.com/writing/how-do-you-find-the-time/https://steveklabnik.com/writing/how-do-you-find-the-time/Thu, 27 Sep 2012 00:00:00 GMTSeriously: numbers: use them!https://steveklabnik.com/writing/seriously--numbers--use-them-/https://steveklabnik.com/writing/seriously--numbers--use-them-/Thu, 27 Sep 2012 00:00:00 GMTResque: let's do thishttps://steveklabnik.com/writing/resque--let-s-do-this/https://steveklabnik.com/writing/resque--let-s-do-this/Sat, 22 Sep 2012 00:00:00 GMTSoftware and communityhttps://steveklabnik.com/writing/software-and-community/https://steveklabnik.com/writing/software-and-community/Tue, 18 Sep 2012 00:00:00 GMTRandom Ruby Tricks: Class.newhttps://steveklabnik.com/writing/random-ruby-tricks--class-new/https://steveklabnik.com/writing/random-ruby-tricks--class-new/Sun, 09 Sep 2012 00:00:00 GMTProtocol and languagehttps://steveklabnik.com/writing/protocol-and-language/https://steveklabnik.com/writing/protocol-and-language/Mon, 03 Sep 2012 00:00:00 GMTRandom Ruby Tricks: Struct.newhttps://steveklabnik.com/writing/random-ruby-tricks--struct-new/https://steveklabnik.com/writing/random-ruby-tricks--struct-new/Sat, 01 Sep 2012 00:00:00 GMTNew blog: Wordshttps://steveklabnik.com/writing/new-blog--words/https://steveklabnik.com/writing/new-blog--words/Fri, 31 Aug 2012 00:00:00 GMTProtological Control: an introductionhttps://steveklabnik.com/writing/protological-control-an-introduction/https://steveklabnik.com/writing/protological-control-an-introduction/Mon, 13 Aug 2012 00:00:00 GMTDayZhttps://steveklabnik.com/writing/dayz/https://steveklabnik.com/writing/dayz/Wed, 25 Jul 2012 00:00:00 GMTSparrowhttps://steveklabnik.com/writing/sparrow/https://steveklabnik.com/writing/sparrow/Sat, 21 Jul 2012 00:00:00 GMTWhy I don't like factory_girlhttps://steveklabnik.com/writing/why-i-don-t-like-factory_girl/https://steveklabnik.com/writing/why-i-don-t-like-factory_girl/Sat, 14 Jul 2012 00:00:00 GMTHow can I contribute to Ruby on Rails?https://steveklabnik.com/writing/how-can-i-contribute-to-ruby-on-rails-/https://steveklabnik.com/writing/how-can-i-contribute-to-ruby-on-rails-/Thu, 05 Jul 2012 00:00:00 GMTIntroducing issue2prhttps://steveklabnik.com/writing/introducing-issue2pr/https://steveklabnik.com/writing/introducing-issue2pr/Fri, 29 Jun 2012 00:00:00 GMTShow solidarity to all who resisthttps://steveklabnik.com/writing/show-solidarity-to-all-who-resist/https://steveklabnik.com/writing/show-solidarity-to-all-who-resist/Thu, 31 May 2012 00:00:00 GMTFinalehttps://steveklabnik.com/writing/finale/https://steveklabnik.com/writing/finale/Wed, 30 May 2012 00:00:00 GMTShoes 4 work is starting: get involved!https://steveklabnik.com/writing/shoes-4-work-is-starting--get-involved/https://steveklabnik.com/writing/shoes-4-work-is-starting--get-involved/Fri, 25 May 2012 00:00:00 GMTMixins: a refactoring anti-patternhttps://steveklabnik.com/writing/mixins--a-refactoring-anti-pattern/https://steveklabnik.com/writing/mixins--a-refactoring-anti-pattern/Mon, 07 May 2012 00:00:00 GMTOn the eve of #m1gshttps://steveklabnik.com/writing/on-the-eve-of--m1gs/https://steveklabnik.com/writing/on-the-eve-of--m1gs/Mon, 30 Apr 2012 00:00:00 GMTCards for dad - follow-uphttps://steveklabnik.com/writing/cards-for-dad--follow-up/https://steveklabnik.com/writing/cards-for-dad--follow-up/Sun, 22 Apr 2012 00:00:00 GMTBuilding StoreEnginehttps://steveklabnik.com/writing/building-storeengine/https://steveklabnik.com/writing/building-storeengine/Thu, 05 Apr 2012 00:00:00 GMTAbout antisocialne.wshttps://steveklabnik.com/writing/about-antisocialne-ws/https://steveklabnik.com/writing/about-antisocialne-ws/Tue, 03 Apr 2012 00:00:00 GMTAnti-capitalism 101https://steveklabnik.com/writing/anti-capitalism-101/https://steveklabnik.com/writing/anti-capitalism-101/Sat, 31 Mar 2012 00:00:00 GMTBirthday cards for Dadhttps://steveklabnik.com/writing/birthday-cards-for-dad/https://steveklabnik.com/writing/birthday-cards-for-dad/Mon, 26 Mar 2012 00:00:00 GMTTransmuting Philosophy into Machineryhttps://steveklabnik.com/writing/transmuting-philosophy-into-machinery/https://steveklabnik.com/writing/transmuting-philosophy-into-machinery/Thu, 08 Mar 2012 00:00:00 GMTHypermedia API reading listhttps://steveklabnik.com/writing/hypermedia-api-reading-list/https://steveklabnik.com/writing/hypermedia-api-reading-list/Mon, 27 Feb 2012 00:00:00 GMTREST is overhttps://steveklabnik.com/writing/rest-is-over/https://steveklabnik.com/writing/rest-is-over/Thu, 23 Feb 2012 00:00:00 GMTAn API ontologyhttps://steveklabnik.com/writing/an-api-ontology/https://steveklabnik.com/writing/an-api-ontology/Mon, 13 Feb 2012 00:00:00 GMTIntroducing metadownhttps://steveklabnik.com/writing/introducing-metadown/https://steveklabnik.com/writing/introducing-metadown/Mon, 23 Jan 2012 00:00:00 GMTMoving from Sinatra to Railshttps://steveklabnik.com/writing/moving-from-sinatra-to-rails/https://steveklabnik.com/writing/moving-from-sinatra-to-rails/Tue, 17 Jan 2012 00:00:00 GMTImplementing HATEOS with presentershttps://steveklabnik.com/writing/implementing-hateoas-with-presenters/https://steveklabnik.com/writing/implementing-hateoas-with-presenters/Fri, 06 Jan 2012 00:00:00 GMTActiveRecord considered harmfulhttps://steveklabnik.com/writing/active-record-considered-harmful/https://steveklabnik.com/writing/active-record-considered-harmful/Fri, 30 Dec 2011 00:00:00 GMTDevise: ActionController::RoutingError (No Route Matches [GET] /users/sign_out)https://steveklabnik.com/writing/devise-actioncontroller-routingerror-no-route-matches-get-slash-users-slash-sign-out/https://steveklabnik.com/writing/devise-actioncontroller-routingerror-no-route-matches-get-slash-users-slash-sign-out/Thu, 22 Dec 2011 00:00:00 GMTRedcarpet is awesomehttps://steveklabnik.com/writing/redcarpet-is-awesome/https://steveklabnik.com/writing/redcarpet-is-awesome/Wed, 21 Dec 2011 00:00:00 GMTWrite better cukes with the rel attributehttps://steveklabnik.com/writing/write-better-cukes-with-the-rel-attribute/https://steveklabnik.com/writing/write-better-cukes-with-the-rel-attribute/Tue, 20 Dec 2011 00:00:00 GMTMarx, anarchism, and web standardshttps://steveklabnik.com/writing/marx-anarchism-and-web-standards/https://steveklabnik.com/writing/marx-anarchism-and-web-standards/Thu, 15 Dec 2011 00:00:00 GMTFast Rails tests with CanCanhttps://steveklabnik.com/writing/fast-rails-tests-with-cancan/https://steveklabnik.com/writing/fast-rails-tests-with-cancan/Mon, 12 Dec 2011 00:00:00 GMTBook review: New Programmer's Survival Manualhttps://steveklabnik.com/writing/book-review-new-programmers-survival-manual/https://steveklabnik.com/writing/book-review-new-programmers-survival-manual/Mon, 28 Nov 2011 00:00:00 GMTBurnouthttps://steveklabnik.com/writing/burnout/https://steveklabnik.com/writing/burnout/Thu, 17 Nov 2011 00:00:00 GMTYour startup is not a platformhttps://steveklabnik.com/writing/your-startup-is-not-a-platform/https://steveklabnik.com/writing/your-startup-is-not-a-platform/Tue, 25 Oct 2011 00:00:00 GMTFor science: I'm killing my cell phonehttps://steveklabnik.com/writing/for-science-im-killing-my-cell-phone/https://steveklabnik.com/writing/for-science-im-killing-my-cell-phone/Wed, 19 Oct 2011 00:00:00 GMTMatz is nice so we are nicehttps://steveklabnik.com/writing/matz-is-nice-so-we-are-nice/https://steveklabnik.com/writing/matz-is-nice-so-we-are-nice/Wed, 19 Oct 2011 00:00:00 GMTRubinius is awesomehttps://steveklabnik.com/writing/rubinius-is-awesome/https://steveklabnik.com/writing/rubinius-is-awesome/Tue, 04 Oct 2011 00:00:00 GMTGitHub is anarchy for programmershttps://steveklabnik.com/writing/github-is-anarchy-for-programmers/https://steveklabnik.com/writing/github-is-anarchy-for-programmers/Sat, 01 Oct 2011 00:00:00 GMTReal, modern Ruby developmenthttps://steveklabnik.com/writing/real-modern-ruby-development/https://steveklabnik.com/writing/real-modern-ruby-development/Wed, 28 Sep 2011 00:00:00 GMTI'm deleting my Facebook tonighthttps://steveklabnik.com/writing/im-deleting-my-facebook-tonight/https://steveklabnik.com/writing/im-deleting-my-facebook-tonight/Mon, 26 Sep 2011 00:00:00 GMTMore rstat.us refactoringhttps://steveklabnik.com/writing/more-rstat-dot-us-refactoring/https://steveklabnik.com/writing/more-rstat-dot-us-refactoring/Fri, 23 Sep 2011 00:00:00 GMTExtracting domain models: a practical examplehttps://steveklabnik.com/writing/extracting-domain-models-a-practical-example/https://steveklabnik.com/writing/extracting-domain-models-a-practical-example/Thu, 22 Sep 2011 00:00:00 GMTWe forget that open source is made of peoplehttps://steveklabnik.com/writing/we-forget-that-open-source-is-made-of-people/https://steveklabnik.com/writing/we-forget-that-open-source-is-made-of-people/Mon, 12 Sep 2011 00:00:00 GMTBetter Ruby Presentershttps://steveklabnik.com/writing/better-ruby-presenters/https://steveklabnik.com/writing/better-ruby-presenters/Fri, 09 Sep 2011 00:00:00 GMTThe secret to Rails OO designhttps://steveklabnik.com/writing/the-secret-to-rails-oo-design/https://steveklabnik.com/writing/the-secret-to-rails-oo-design/Tue, 06 Sep 2011 00:00:00 GMTThe self improvement pomodorohttps://steveklabnik.com/writing/the-self-improvement-pomodoro/https://steveklabnik.com/writing/the-self-improvement-pomodoro/Sun, 04 Sep 2011 00:00:00 GMTI'm making it dead simple to contribute to Ruby's documentationhttps://steveklabnik.com/writing/im-making-it-dead-simple-to-contribute-to-ruby-s-documentation/https://steveklabnik.com/writing/im-making-it-dead-simple-to-contribute-to-ruby-s-documentation/Mon, 22 Aug 2011 00:00:00 GMTSome people understand REST and HTTPhttps://steveklabnik.com/writing/some-people-understand-rest-and-http/https://steveklabnik.com/writing/some-people-understand-rest-and-http/Sun, 07 Aug 2011 00:00:00 GMTTwitter is too important to be owned by Twitterhttps://steveklabnik.com/writing/twitter-is-to-important-to-be-owned-by-twitter/https://steveklabnik.com/writing/twitter-is-to-important-to-be-owned-by-twitter/Sun, 24 Jul 2011 00:00:00 GMTNobody understands REST or HTTPhttps://steveklabnik.com/writing/nobody-understands-rest-or-http/https://steveklabnik.com/writing/nobody-understands-rest-or-http/Sun, 03 Jul 2011 00:00:00 GMTSingle text, many mastershttps://steveklabnik.com/writing/single-text-many-masters/https://steveklabnik.com/writing/single-text-many-masters/Sat, 21 May 2011 00:00:00 GMTContributing to Ruby's documentationhttps://steveklabnik.com/writing/contributing-to-ruby-s-documentation/https://steveklabnik.com/writing/contributing-to-ruby-s-documentation/Fri, 20 May 2011 00:00:00 GMTThe next iteration of my bloghttps://steveklabnik.com/writing/the-next-iteration-of-my-blog/https://steveklabnik.com/writing/the-next-iteration-of-my-blog/Thu, 12 May 2011 00:00:00 GMTThe first week of rstat.us: users, press, and scaling, oh my!https://steveklabnik.com/writing/the-first-week-of-rstat-us-users-press-scaling-oh-my/https://steveklabnik.com/writing/the-first-week-of-rstat-us-users-press-scaling-oh-my/Wed, 30 Mar 2011 00:00:00 GMTAnnouncing rstat.ushttps://steveklabnik.com/writing/announcing-rstat-us/https://steveklabnik.com/writing/announcing-rstat-us/Wed, 23 Mar 2011 00:00:00 GMTDid you hear? I'm Ruby Mendicant University's first visiting teacherhttps://steveklabnik.com/writing/id-you-hear-i-m-ruby-mendicant-university-s-first-visiting-teacher/https://steveklabnik.com/writing/id-you-hear-i-m-ruby-mendicant-university-s-first-visiting-teacher/Fri, 18 Mar 2011 00:00:00 GMTI'm quitting Hacker Newshttps://steveklabnik.com/writing/i-m-quitting-hacker-news/https://steveklabnik.com/writing/i-m-quitting-hacker-news/Thu, 03 Mar 2011 00:00:00 GMTLiving in the cloudhttps://steveklabnik.com/writing/living-in-the-cloud/https://steveklabnik.com/writing/living-in-the-cloud/Thu, 24 Feb 2011 00:00:00 GMTA few notes on Foucaulthttps://steveklabnik.com/writing/a-few-notes-on-foucault/https://steveklabnik.com/writing/a-few-notes-on-foucault/Sat, 22 Jan 2011 00:00:00 GMTGoals for 2011https://steveklabnik.com/writing/goals-for-2011/https://steveklabnik.com/writing/goals-for-2011/Sun, 02 Jan 2011 00:00:00 GMTHackety Hack v1.0https://steveklabnik.com/writing/hackety-hack-v1-0/https://steveklabnik.com/writing/hackety-hack-v1-0/Sat, 25 Dec 2010 00:00:00 GMTThe hardest decision I've ever madehttps://steveklabnik.com/writing/the-hardest-decision-i-ve-ever-made/https://steveklabnik.com/writing/the-hardest-decision-i-ve-ever-made/Wed, 17 Nov 2010 00:00:00 GMTTrolling is a arthttps://steveklabnik.com/writing/trolling-is-a-art/https://steveklabnik.com/writing/trolling-is-a-art/Fri, 24 Sep 2010 00:00:00 GMT80% of success is showing uphttps://steveklabnik.com/writing/80-of-success-is-showing-up/https://steveklabnik.com/writing/80-of-success-is-showing-up/Tue, 21 Sep 2010 00:00:00 GMTTrouble with Diasporahttps://steveklabnik.com/writing/trouble-with-diaspora/https://steveklabnik.com/writing/trouble-with-diaspora/Fri, 17 Sep 2010 00:00:00 GMTA word about _why, Whyday, and Hackety Hackhttps://steveklabnik.com/writing/a-word-about-why-whyday-and-hackety-hack/https://steveklabnik.com/writing/a-word-about-why-whyday-and-hackety-hack/Thu, 19 Aug 2010 00:00:00 GMTA blip in timehttps://steveklabnik.com/writing/a-blip-in-time/https://steveklabnik.com/writing/a-blip-in-time/Sat, 24 Jul 2010 00:00:00 GMTA case study in being excellent: Divvyhttps://steveklabnik.com/writing/case-study-in-being-excellent-divvy/https://steveklabnik.com/writing/case-study-in-being-excellent-divvy/Wed, 30 Jun 2010 00:00:00 GMTProductivity Waveshttps://steveklabnik.com/writing/productivity-waves/https://steveklabnik.com/writing/productivity-waves/Tue, 08 Jun 2010 00:00:00 GMTA Declaration of the Independence of Cyberspacehttps://steveklabnik.com/writing/you-are-terrified-of-your-own-children-since-they-are-natives-in-a-world-where-you-will-always-be-immigrants/https://steveklabnik.com/writing/you-are-terrified-of-your-own-children-since-they-are-natives-in-a-world-where-you-will-always-be-immigrants/Sat, 01 May 2010 00:00:00 GMTA break with the pasthttps://steveklabnik.com/writing/a-break-with-the-past/https://steveklabnik.com/writing/a-break-with-the-past/Tue, 27 Apr 2010 00:00:00 GMTBook review: Reworkhttps://steveklabnik.com/writing/book-review-rework/https://steveklabnik.com/writing/book-review-rework/Wed, 10 Mar 2010 00:00:00 GMTCreate a more compelling experience for your users through game mechanicshttps://steveklabnik.com/writing/create-a-more-compelling-experience-for-your-users-through-game-mechanics/https://steveklabnik.com/writing/create-a-more-compelling-experience-for-your-users-through-game-mechanics/Mon, 08 Mar 2010 00:00:00 GMTWriting a su feature with Authlogichttps://steveklabnik.com/writing/writing-a-su-feature-with-authlogic/https://steveklabnik.com/writing/writing-a-su-feature-with-authlogic/Fri, 05 Mar 2010 00:00:00 GMTReddit drama: an interesting look at community valueshttps://steveklabnik.com/writing/reddit-drama-an-interesting-look-at-community-values/https://steveklabnik.com/writing/reddit-drama-an-interesting-look-at-community-values/Mon, 01 Mar 2010 00:00:00 GMTThe Hackety Manifestohttps://steveklabnik.com/writing/the-hackety-mainfesto/https://steveklabnik.com/writing/the-hackety-mainfesto/Thu, 31 Dec 2009 00:00:00 GMTThe Little Coder's Predicamenthttps://steveklabnik.com/writing/the-little-coders-predicament/https://steveklabnik.com/writing/the-little-coders-predicament/Mon, 28 Dec 2009 00:00:00 GMTAbout Crowshttps://steveklabnik.com/writing/about-crows/https://steveklabnik.com/writing/about-crows/Wed, 02 Dec 2009 00:00:00 GMT \ No newline at end of file diff --git a/tests/test_feed.py b/tests/test_feed.py index 4dd0ae5..fd1a0f3 100644 --- a/tests/test_feed.py +++ b/tests/test_feed.py @@ -1,6 +1,7 @@ import asyncio import dataclasses import http.server +import pathlib import threading import typing @@ -89,6 +90,22 @@ class TestWebServer: self.respond(path, MockResponse(code, headers, content)) + def handle_canned_response(self, path: str, response_path: str): + headers = [] + with open(pathlib.Path(__file__).parent / response_path, "rb") as f: + _, code = f.readline().decode("utf-8").split(" ", maxsplit=1) + while True: + line = f.readline().decode("utf-8").rstrip() + if len(line) == 0: + break + header = tuple(line.split(":", maxsplit=1)) + assert len(header) == 2 + headers.append(header) + + content = f.read() + + self.respond(path, MockResponse(int(code), headers, content)) + def respond(self, path: str, response: MockResponse): response_list = self.handlers.get(path) if response_list is None: @@ -198,3 +215,14 @@ def test_fetch_after_permanent_to_permanent_redirect(): # NOTE: we should record the latest redirect. assert new_meta.url == server.make_url("/two") assert isinstance(result, feed.Feed) + + +def test_titles_with_entities(): + with TestWebServer() as server: + server.handle_canned_response("/feed", "feeds/steveklabnik.com.xml") + + meta = feed.FeedMeta.from_url(server.make_url("/feed")) + result, _ = asyncio.run(feed.fetch_feed(meta)) + + assert isinstance(result, feed.Feed) + assert result.entries[0].title == "When should I use String vs &str?"