Comments (6)
I agree with this course of action.
I would suggest you add the "help-wanted" or/and "up-for-grabs" labels onto this issue
from lecture-hoarder.
I considered this, but I wasn't sure whether it would be worth the time spent refactoring for how little changes will probably be made from this point onwards.
Plus we'd probably need a username and password combination for running tests with? (Unless you mean only doing tests locally with supplied usernames?)
from lecture-hoarder.
I see two main approaches forward:
-
A fake http server that will return cached results from the official server (but slightly edited of course)
-
Separating out the web requests into their own object, and just stubbing that object when testing the rest of the logic
from lecture-hoarder.
The HTML parsing is one of the most important parts of the logic imo, and probably the easiest to break.
Therefore the HTTP server would be the way forwards.
It would be easy enough to introduce variables for the https://login.manchester.ac.uk/
and https://video.manchester.ac.uk/
base URLs, which could then be changed for testing purposes.
But trying to create a semi-accurate web server is more effort than I'd want to do, so I'd be leaving it up to you to implement.
from lecture-hoarder.
The login and video URLs are now exposed in the settings, so theoretically setup with a fake HTTP server would now be possible
from lecture-hoarder.
Abstraction of web requests has been completed, now a unit testing setup with dependency injection can be implemented
from lecture-hoarder.
Related Issues (20)
- Errors sometimes not being reported correctly HOT 2
- Broken on Windows HOT 1
- Video page format change HOT 2
- Clipping for long podcast names
- Check file access permissions HOT 1
- Abstract into model HOT 2
- Categorise lectures into years HOT 15
- Make settings file optional
- Abstract web requests HOT 1
- Change get_podcast_downloader return type HOT 2
- Validate every usage of BeautifulSoup in UomPodcastProvider
- Deprecate login_service_url and video_service_base_url settings
- Abstract file storage HOT 1
- Add proper command line option support HOT 2
- Add contributing guidelines
- Check for duplicate but out of order podcasts
- Only download podcasts from the current year
- Recommend setup by venv
- Login broken by switch to Duo 2FA HOT 1
- Download automatic subtitles
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lecture-hoarder.