tedder
250e83ad7e
more specific asserts
...
This lets the testing framework show the test error better.
2018-09-01 22:32:47 -07:00
tedder
660724741c
quick refactor for deprecated 'assertEquals'
...
It's been quietly allowed but was dropped in py3.
2018-09-01 22:31:33 -07:00
tedder
a5f87597ad
refactor and upgrade tests
...
Some prepwork for py3. Tossing these together:
- assertItemsEqual doesn't do what it says on the box. It only said "hey, these lists have the same number of items". Not content or anything. Changing that to SetEqual, which is much closer to what is wanted- ensuring that lists have the same content without caring about their order.
- use assertRaises instead of try/catch
- update some mocks, especially mock_open.
- include the refactored test_get_recovery_data sent to the maintenance branch in #2806 .
2018-09-01 22:27:10 -07:00
Gina Häußge
b83dd76c89
Merge branch 'maintenance' into devel
...
# Conflicts:
# src/octoprint/static/js/app/viewmodels/printerstate.js
2018-07-20 12:27:36 +02:00
Gina Häußge
a37165d7d9
Tracking: Fix unit tests
2018-07-19 18:25:16 +02:00
Gina Häußge
9e0e4bf7b6
Pi Support: Allow configuration of vcgencmd
2018-07-19 18:17:28 +02:00
Gina Häußge
1cff2581db
OctoPi support => Pi support
...
* changed model detection implementation to use device-tree
* now active if running on a Pi, regardless whether that runs OctoPi
or not
* detect undervoltage/overheat issues via vcgencmd and report back on
UI
2018-07-17 14:38:12 +02:00
Gina Häußge
fd4ff2bf37
Merge branch 'maintenance' into devel
...
# Conflicts:
# AUTHORS.md
# src/octoprint/plugin/__init__.py
# src/octoprint/server/__init__.py
# src/octoprint/server/api/__init__.py
# tests/timelapse/test_timelapse_helpers.py
2018-07-16 15:29:02 +02:00
Gina Häußge
e224b0ac71
Fix & extend unit tests
2018-07-13 18:02:42 +02:00
Gina Häußge
7b773f6fd2
Merge branch 'maintenance' into devel
...
# Conflicts:
# setup.py
# src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js
# src/octoprint/templates/dialogs/settings/accesscontrol.jinja2
# src/octoprint/templates/sidebar/files_header.jinja2
2018-05-18 13:45:42 +02:00
Koen Kooi
5aef014773
unit tests: timelapse: add videocodec test
...
This test checks if both videocodec and container format have been set
correctly.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net >
2018-05-15 10:42:11 +02:00
Gina Häußge
bd7a28af5b
Fix unit test
2018-05-10 18:35:25 +02:00
Gina Häußge
104b0a504c
Merge branch 'pr/2586' into devel
...
# Conflicts:
# AUTHORS.md
# src/octoprint/server/util/sockjs.py
# src/octoprint/static/js/app/viewmodels/timelapse.js
2018-05-10 18:18:05 +02:00
Gina Häußge
8369d311bf
Small refactoring & fixed tests
2018-05-03 17:42:30 +02:00
Gina Häußge
ddd2711f95
Fix a broken unit test
...
We now initialize the folders when initializing the settings, so the
test that the folder didn't yet exist before retrieving its path
naturally failed.
2018-05-03 12:18:10 +02:00
Gina Häußge
d8eb57548d
Merge branch 'dev/granularPermissions' into devel
...
# Conflicts:
# src/octoprint/server/api/files.py
# src/octoprint/server/api/job.py
# src/octoprint/static/js/app/viewmodels/users.js
2018-04-26 19:27:11 +02:00
Gina Häußge
3d7016f500
Fixed/removed completely outdated & broken tests
2018-04-26 19:09:03 +02:00
Gina Häußge
135cf6a9cc
Migrate file storage metadata to json
...
As suggested by @CapnBry, that should give us a significant speed
boost considering that yaml serialization and deserialization is some
orders of magnitude slower than json.
We only do that for the file metadata for now - it has the biggest gain
to expect from a speed boost, and having the configuration as yaml
actually has its readability advantages.
2018-04-25 17:01:24 +02:00
ZachNo
b7adf115ee
Changed to CommandlineCaller, added test
...
Now using CommandlineCaller using a custom logger function.
Added test in test_timelapse_helpers.py for _process_ffmpeg_output
2018-04-21 21:44:52 -04:00
Zachary N
2fa18f5855
Merge branch 'devel' into dev/timelapseProgress
2018-04-16 18:25:48 -04:00
ZachNo
a4ce92c963
Added timelapse render progress bar
...
For issue @485
Added progress bar to the Timelapse tab between the settings and files
Added code to process the output of ffmpeg and compute a percentage
Added code to communicate the percentage from the server to the client
Added myself to the authors
Changed tests to reflect new loglevel
2018-04-16 06:05:25 -04:00
Gina Häußge
08bfae216c
Merge branch 'devel' into dev/permission
...
# Conflicts:
# src/octoprint/plugins/printer_safety_check/__init__.py
# src/octoprint/server/__init__.py
# src/octoprint/server/util/sockjs.py
2018-04-12 16:37:27 +02:00
Gina Häußge
6f224bd825
Workaround for typo & whitespace in Malyan M115 responses
...
NAME. instead of NAME:, whitespace between key and value component.
2018-04-11 11:12:56 +02:00
Gina Häußge
025f545ef7
Better requirement detection in octoprint_setuptools
...
Plus unit tests.
2018-04-06 14:59:11 +02:00
Gina Häußge
1852578136
Merge branch 'devel' into dev/permission
...
# Conflicts:
# src/octoprint/plugins/logging/__init__.py
# src/octoprint/server/__init__.py
# src/octoprint/server/util/sockjs.py
# src/octoprint/static/css/octoprint.css
2018-04-04 16:47:51 +02:00
Gina Häußge
9f80aefcc9
thaw_frozendict should be fully recursive
...
So far it was only deep-diving into frozendicts, not dicts (which might
contain frozendicts).
In principle we probably should also dive into tuples and lists and
other containers, but in our current application we don't put
frozendicts into those so let's not overdo it.
2018-04-03 16:56:59 +02:00
Gina Häußge
f782cfe83f
Thaw the frozendict on printer.get_current_data
...
We don't want calling code to run into trouble because of that.
Fixes #2506
2018-03-22 12:58:52 +01:00
Gina Häußge
d1711f0376
Merge branch 'devel' into dev/permission
...
# Conflicts:
# src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js
# src/octoprint/server/__init__.py
# src/octoprint/server/util/flask.py
# src/octoprint/server/util/sockjs.py
# src/octoprint/static/css/octoprint.css
# src/octoprint/static/js/app/viewmodels/printerstate.js
# src/octoprint/templates/tabs/timelapse.jinja2
2018-03-20 16:10:19 +01:00
Gina Häußge
2abff3b589
Fix broken unit test
2018-03-06 15:05:25 +01:00
Gina Häußge
2db2532c2f
Fix unit tests broken by implementation of #2208
2018-02-28 17:07:53 +01:00
Gina Häußge
b9a5e1db69
Merge branch 'devel' into dev/permission
...
# Conflicts:
# src/octoprint/plugins/corewizard/__init__.py
# src/octoprint/plugins/pluginmanager/__init__.py
# src/octoprint/plugins/softwareupdate/__init__.py
# src/octoprint/printer/standard.py
# src/octoprint/server/__init__.py
# src/octoprint/server/api/job.py
# src/octoprint/server/api/log.py
# src/octoprint/server/util/__init__.py
# src/octoprint/server/views.py
# src/octoprint/static/css/octoprint.css
# src/octoprint/static/js/app/main.js
# src/octoprint/static/js/app/viewmodels/log.js
# src/octoprint/static/js/app/viewmodels/loginstate.js
# src/octoprint/static/js/app/viewmodels/printerstate.js
# src/octoprint/static/js/app/viewmodels/users.js
# src/octoprint/static/less/octoprint.less
# src/octoprint/templates/dialogs/settings/logs.jinja2
# src/octoprint/templates/tabs/control.jinja2
# src/octoprint/util/__init__.py
2018-02-20 15:42:43 +01:00
Gina Häußge
ec12bd7cd4
Introduce CaseInsensitiveSet & use for valid boolean trues
...
Follow up to #2385
2018-02-06 10:15:57 +01:00
Gina Häußge
ef6b39757b
Merge branch 'maintenance' of github.com:foosel/OctoPrint into maintenance
2017-12-08 16:22:19 +01:00
Gina Häußge
86934c8863
Support M114 response from RepRapFirmware
...
RRF uses format X:... Y:... Z:... E0:... E1:... instead of
X:... Y:... Z:... E:...
2017-12-06 16:03:19 +01:00
Gina Häußge
13eb5ec7ed
Merge pull request #2250 from kantlivelong/resettable_timer
...
Added ResettableTimer class
2017-12-06 11:42:45 +01:00
Shawn Bruce
6ce6160f3d
Added ResettableTimer class
2017-12-05 12:00:12 -05:00
Gina Häußge
06816fb8dc
Test: checksum missing => missing checksum
2017-12-04 16:04:38 +01:00
Gina Häußge
cc0a17f2ac
Unit tests for MachineCom._handle_errors
...
With various Marlin and Repetier error variants.
2017-12-04 15:56:31 +01:00
Gina Häußge
088b0cf1e7
Merge branch 'devel' into dev/permission
...
# Conflicts:
# src/octoprint/server/__init__.py
# src/octoprint/server/api/__init__.py
# src/octoprint/server/util/flask.py
2017-11-28 13:19:54 +01:00
Gina Häußge
14bd0632c0
parse_requirements => Requirement.parse
...
Since we only ever handle one requirement here, the parse_requirements
generator (which btw needs a next m() is not the best choice.
Also extracted install command cleanup into class method and added tests
for that.
cc @markwal
2017-11-28 12:02:43 +01:00
Gina Häußge
022c59a094
Fix unit tests again
2017-11-21 14:36:30 +01:00
Gina Häußge
d8cffc4b22
Merge branch 'devel' into dev/permission
...
# Conflicts:
# src/octoprint/plugins/announcements/static/js/announcements.js
# src/octoprint/plugins/pluginmanager/static/js/pluginmanager.js
# src/octoprint/plugins/softwareupdate/static/js/softwareupdate.js
# src/octoprint/server/__init__.py
# src/octoprint/static/css/octoprint.css
# src/octoprint/static/js/app/viewmodels/connection.js
# src/octoprint/static/js/app/viewmodels/control.js
# src/octoprint/static/js/app/viewmodels/files.js
# src/octoprint/static/js/app/viewmodels/gcode.js
# src/octoprint/static/js/app/viewmodels/log.js
# src/octoprint/static/js/app/viewmodels/loginstate.js
# src/octoprint/static/js/app/viewmodels/navigation.js
# src/octoprint/static/js/app/viewmodels/printerprofiles.js
# src/octoprint/static/js/app/viewmodels/printerstate.js
# src/octoprint/static/js/app/viewmodels/settings.js
# src/octoprint/static/js/app/viewmodels/temperature.js
# src/octoprint/static/js/app/viewmodels/terminal.js
# src/octoprint/static/js/app/viewmodels/timelapse.js
# src/octoprint/static/js/app/viewmodels/users.js
2017-11-21 11:42:28 +01:00
Gina Häußge
ebfc6f2f26
More dynamic detection of plugin mixins
...
Instead of hardcoding a list of supported mixins, we now instead define
a base class (or a list thereof) from which mixins might inherit and use
inspection to determine the set of mixins each plugin implementation
implements. Not only will that reduce the risk of forgetting to add a
new mixin to the whitelist, but it will also allow mixins defined by
plugins.
2017-11-13 16:01:37 +01:00
Gina Häußge
1180e4e27b
Fix & extend environment detection on Pi
2017-11-10 18:27:52 +01:00
Gina Häußge
b2d70de144
Environment detection & logging on startup
...
Incl. OctoPi version & RPi model through bundled plugin that only
gets loaded if OctoPi is detected.
2017-11-10 17:32:59 +01:00
Gina Häußge
69f9c523f9
Add utm tags to announcement links
2017-11-09 10:49:39 +01:00
Gina Häußge
e974cb8ec5
Refactored (Permissions|Group|User)Manager
...
* Removed PermissionsManager and merged functionality of that into
Permissions class
* Decoupled GroupManager from UserManager
* Renamed some things for less redundancy
* Removed unused YAML conversion methods
* Stricter differentiation between Manager parent class and concrete
implementations
* Marked broken tests as skipped and broken, separated them further
and added some
2017-11-08 15:59:31 +01:00
Gina Häußge
4e0d3725cb
Refactor someName => some_name in access classes
2017-11-02 14:30:35 +01:00
Gina Häußge
f45cb1560f
Fix SessionUserTestCase
2017-11-02 14:14:57 +01:00
Marc Hannappel
d88b1fbec0
Merge branch 'devel' of github.com:foosel/OctoPrint into dev/permission
2017-10-25 09:11:13 +02:00