mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-27 21:16:48 +00:00
Add python requirements file
This commit is contained in:
parent
96ae1be3ec
commit
caa10b5f8f
1
.github/workflows/ci.yaml
vendored
1
.github/workflows/ci.yaml
vendored
@ -37,5 +37,6 @@ jobs:
|
|||||||
- run: flutter analyze
|
- run: flutter analyze
|
||||||
- name: Run Unit Tests
|
- name: Run Unit Tests
|
||||||
run: |
|
run: |
|
||||||
|
pip install -Ur requirements.txt
|
||||||
flutter test --coverage
|
flutter test --coverage
|
||||||
coveralls
|
coveralls
|
4
requirements.txt
Normal file
4
requirements.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Python requirements for devops
|
||||||
|
|
||||||
|
coverage==5.3 # Unit test coverage
|
||||||
|
coveralls==2.1.2 # Coveralls linking (for code coverage reporting)
|
@ -27,8 +27,21 @@ void main() {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test("Select Profile", () async {
|
// Run a set of tests for user profile functionality
|
||||||
|
group("Profile Tests", () async {
|
||||||
|
|
||||||
|
test("Profile Name Check", () async {
|
||||||
|
bool result = false;
|
||||||
|
|
||||||
|
result = await UserProfileDBManager().profileNameExists("doesnotexist");
|
||||||
|
expect(result, equals(false));
|
||||||
|
|
||||||
|
result = await UserProfileDBManager().profileNameExists("testuser");
|
||||||
|
expect(result, equals(true));
|
||||||
|
});
|
||||||
|
|
||||||
// Ensure that we can select a user profile
|
// Ensure that we can select a user profile
|
||||||
|
test("Select Profile", () async {
|
||||||
final prf = await UserProfileDBManager().getSelectedProfile();
|
final prf = await UserProfileDBManager().getSelectedProfile();
|
||||||
|
|
||||||
expect(prf, isNot(null));
|
expect(prf, isNot(null));
|
||||||
@ -37,5 +50,6 @@ void main() {
|
|||||||
expect(prf?.password, equals("testpassword"));
|
expect(prf?.password, equals("testpassword"));
|
||||||
expect(prf?.server, equals("http://localhost:12345"));
|
expect(prf?.server, equals("http://localhost:12345"));
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user